I've looked on the php.net manual, and I found this code:
$conn_id = ftp_connect("");
$src_dir = "/";
$dst_dir = "/";
ftp_copy($src_dir, $dst_dir);
ftp_close($conn_id)
function ftp_copy($src_dir, $dst_dir)
{
global $conn_id;
$d = dir($src_dir);
while($file = $d->read())
{
if ($file != "." && $file != "..")
{
if (is_dir($src_dir."/".$file))
{
if (!@ftp_chdir($conn_id, $dst_dir."/".$file))
{
ftp_mkdir($conn_id, $dst_dir."/".$file);
}
ftp_copy($src_dir."/".$file, $dst_dir."/".$file);
}
else
{
$upload = ftp_put($conn_id, $dst_dir."/".$file, $src_dir."/".$file, FTP_BINARY);
}
}
}
$d->close();
}
Will this work to upload all the files in a directory to my other ftp server?
What do I need to put in the top three lines. (I want to upload from my Lycos account, at members.lycos.co.uk/KITTfan2k/SomeSubDirectory to my other server, at ftp.strangelyrandom.com/)
And where would I enter my username and password to this?
Edit: Can someone comment this code to tell me what's going on?
KITTfan2K