PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of windylea  >  FTP Crawler  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example script
Class: FTP Crawler
List recursively all files in a FTP server
Author: By
Last change:
Date: 2 years ago
Size: 502 bytes
 

Contents

Class file image Download
<?php
/*
 * Include required file
 */
include("ftpcrawler.php");

echo
"<pre>";

try
{
   
/*
     * Create a new instance of the class
     */
   
$ftpcrawler = new ftpcrawler;
   
   
/*
     * Set FTP server to connect to
     */
   
$ftpcrawler->server = "ftp://user:pass@example.com:21/folder/subfolder/";

   
/*
     * Crawl and print the result in HTML format
     */
   
print_r($ftpcrawler->crawl("html"));
} catch (
Exception $e)
{
    echo
$e->getMessage();
}
?>