ByVikramVaswaniMelonfireNovember07, below 2000 is the code list: -------------------------------------------------------------------------------- & lt ;! --Codeforindex.html beginsher By Vikram Vaswani
Melonfire
November 07,200 0
The following is a list of codes:
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
/*
--------------------------------------------------------------------------------
DISCLAIMER:
This is use-at-your-own-risk code.
It is meant only for your strative purposes and is not meant for production environments. No warranties of any kind are provided to the user.
You have been warned!
All code copyright Melonfire, 2000. Visit us at http://www.melonfire.com
--------------------------------------------------------------------------------
*/
// Function to connect to FTP server
Function connect ()
{
Global $ server, $ username, $ password;
$ Conn = ftp_connect ($ server );
Ftp_login ($ conn, $ username, $ password );
Return $ conn;
}
// Main program begins
// Check for valid form entries else print error
If (! $ Server |! $ Username |! $ Password)
{
Echo "Form data incomplete! ";
}
Else
{
// Connect
$ Result = connect ();
// Action: change directory
If ($ action = "CWD ")
{
// At initial stage $ rdir does not exist
// So assume default directory
If (! $ Rdir)
{
$ Path = ".";
}
// Get current location $ cdir and add it to requested directory $ rdir
Else
{
$ Path = $ cdir. "/". $ rdir;
}
// Change to requested directory
Ftp_chdir ($ result, $ path );
}
// Action: delete file (s)
Else if ($ action = "Delete ")
{
Ftp_chdir ($ result, $ cdir );
// Loop through selected files and delete
For ($ x = 0; $ x {
Ftp_delete ($ result, $ cdir. "/". $ dfile [$ x]);
}
}
// Action: download files
Else if ($ action = "Download ")
{
Ftp_chdir ($ result, $ cdir );
// Download selected files
// IMPORTANT: you shoshould specify a different download location here !!
For ($ x = 0; $ x {
Ftp_get ($ result, $ dfile [$ x], $ dfile [$ x], FTP_BINARY );
}
}
// Action: upload file
Else if ($ action = "Upload ")
{
Ftp_chdir ($ result, $ cdir );
// Put file