hi. i have a script to transfer a file from my computer via FTP to my server. can somebody help me, please, to change this that i can transfer a file from another server [http-address; not local] to my server and save it there with the name date-time.htm [creating a filename with the actual date and time] ?? Does somebody understand my problem ?? :-)
THANKS !!! Christoph
<?
$conn_ftp = ftp_connect("HOST",PORT);
$ftp = ftp_login($conn_ftp,"username","password");
if($ftp) echo "you are logged in";
else echo "username or password wrong !!";
$serverfile="index.htm";
$local="index_local.htm";
$mode = "FTP_ASCII";
$file = fopen($local,"r");
if(@ftp_fput($conn_ftp,$serverfile,$file,$mode)) echo "successfully uploaded.";
else echo "error.";
fclose($file);
ftp_quit($conn_ftp);
?>