PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Paul Scott   phpftp   example.php   Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example Script
Class: phpftp
Wrapper to the PHP extension to access FTP servers
Author: By
Last change:
Date: 17 years ago
Size: 950 bytes


Class file image Download

//include the ftp class

//instantiate the class
$ftp = new ftp('paul','hello','','ftp_pasv',FALSE);

//connect to the server
//login to the server

//list the files present in the ftp dir

//upload a text file from a filehandle

//upload a regular binary file as is

//create a remote directory
//change directory to our new dir

//what is our present working dir

//delete the file that we uploaded...

//get the file 'hello.mp3' from the server and save it locally as 'hello1.mp3'

//disconnect from the server