PHP Classes

File: description.txt

Recommend this page to a friend!
  Classes of Alexey Dotsenko   Advanced FTP client class   description.txt   Download  
File: description.txt
Role: Documentation
Content type: text/plain
Description: short class methods description
Class: Advanced FTP client class
FTP client in pure PHP
Author: By
Last change: * mdel
+ mmkdir
Date: 16 years ago
Size: 4,340 bytes
 

Contents

Class file image Download
Short description of class methods: parselisting Parses line like: "drwxrwx--- 2 owner group 4096 Apr 23 14:57 text" received from list -l FTP command and return array( type, perms, inode, owner, group, size, date, name ) SetType(type) Sets transfer type: FTP_AUTOASCII, FTP_ASCII, FTP_BINARY Passive(mode) Set what mode to use durinf connection passive or not. ( not passive mode available only if sockets module available in PHP) SetServer(host[[, port], reconnect] ) Set ftp host SetUmask(mask) Set umask for local file sava SetTimeout(seconds) timeout in seconds quit() close FTP connection login(login, password) Login to FTP server pwd() Current FTP path cdup() CDUP command chdir(/path/to/dir) change directory rmdir(/path/to/dir) delete directory mkdir(/path/to/dir) make directory rename(/path/to/from, /path/to/to) rename file filesize(/path/to/file) Get file size mdtm(/path/to/file) Return file timestamp systype() Command SYST delete(/path/to/file) Delete file site(command[, funcname]) SITE command implementation chmod(/path/to/file, mode) CHMOD restore(offset) REST offset features() FEAT command rawlist(arg, /path/to/dir) raw FTP listing nlist(arg, /path/to/dir) FTP listig is_exists(/path/to/file) return true if file/folder exists get(remotefile[, localfile]) receive remotefile from FTP server and save it as localfile or return contents of this file put(localfile[,remotefile]) store localfile to FTP server as remotefile or with the same name mget(remote[,local], continuous) like get but can work with folder tree mput(local[,remote], continuous) like put but can work with folder tree During class initialization you can use 2 parameters: $fc=new ftp(verbose, localecho) verbose: TRUE - print debug information FALSE - (default) do not localecho: TRUE - print all sending anr received commands, codes, etc. FALSE - (default) do not Short description of class methods: parselisting Parses line like: "drwxrwx--- 2 owner group 4096 Apr 23 14:57 text" received from list -l FTP command and return array( type, perms, inode, owner, group, size, date, name ) SetType(type) Sets transfer type: FTP_AUTOASCII, FTP_ASCII, FTP_BINARY Passive(mode) Set what mode to use durinf connection passive or not. ( not passive mode available only if sockets module available in PHP) SetServer(host[[, port], reconnect] ) Set ftp host SetUmask(mask) Set umask for local file sava SetTimeout(seconds) timeout in seconds quit() close FTP connection login(login, password) Login to FTP server pwd() Current FTP path cdup() CDUP command chdir(/path/to/dir) change directory rmdir(/path/to/dir) delete directory mkdir(/path/to/dir) make directory mmkdir(/path/to/dir, mode) recursive make directory rename(/path/to/from, /path/to/to) rename file filesize(/path/to/file) Get file size mdtm(/path/to/file) Return file timestamp systype() Command SYST delete(/path/to/file) Delete file site(command[, funcname]) SITE command implementation chmod(/path/to/file, mode) CHMOD ATTENTION! mode - numeric value ( not string ). use like this: 0777(rwxrwxrwx) or 0666( rw-rw-rw- ) or 0644 (rw-r--r--) 0(zero) at the beginning of number means that number is octal ( not decimal or hexadecimal ) restore(offset) REST offset features() FEAT command rawlist(arg, /path/to/dir) raw FTP listing nlist(arg, /path/to/dir) FTP listig is_exists(/path/to/file) return true if file/folder exists get(remotefile[, localfile]) receive remotefile from FTP server and save it as localfile or return contents of this file put(localfile[,remotefile]) store localfile to FTP server as remotefile or with the same name mget(remote[,local], continuous) like get but can work with folder tree mput(local[,remote], continuous) like put but can work with folder tree During class initialization you can use 2 parameters: $fc=new ftp(verbose, localecho) verbose: TRUE - print debug information FALSE - (default) do not localecho: TRUE - print all sending anr received commands, codes, etc. FALSE - (default) do not