<?php
include_once("ftp.inc.php");
//$ftp=new FTP(true); //For using port
$ftp=new FTP(); // Passive connection
$host="your.site.domain";
$user='user';
$pass='password';
if(!$ftp->connect($host))
die($ftp->error());
echo nl2br($ftp->greet());
$ftp->login($user,$pass);
echo "<br>";
echo $ftp->error();
echo "<br>";
echo nl2br($ftp->features());
//$ftp->chdir("www");
echo "<br>";
echo date("M d, Y @ h:i:s",$ftp->mdtm("phpinfo.php"));
echo "<br>";
//$ftp->cdup("test");
//echo $ftp->read("reference1.html");
//echo $ftp->write("reference1.html");
//$ftp->rename("reference1.html","newFile.html" );
//$ftp->delete("newFile.html");
//$ftp->mkdir("myDir");
//$ftp->rmdir("myDir");
//echo $ftp->pwd();
//print_r($ftp->rawlist());
//print_r($ftp->namelist());
//echo $ftp->system();
//echo $ftp->site("CHMOD myFile");
//echo "<br>";
//echo nl2br($ftp->help());
$ftp->noop();
echo "<br>";
echo $ftp->error();
echo "<br>";
$ftp->Verbose=true;
echo "<br>";
echo nl2br($ftp->sendMsg());
?>
|