Ok. See this:
Script1:
...
<form name="uploadform" action="upload.php" method="post" enctype="multipart/form-data">
<input type="file" name="sourcefile" size="16">
</form>
...
Script2 (upload.php):
...
$ftp_connector = ftp_connect("www.your-domain.tld");
if($ftp_connector) {
if(ftp_login($ftp_connector, "user", "password")) {
you need a user and a password to connect via ftp
echo "ftp-login OK! <br>";
set_time_limit(0);
$destinationfile = ".../.../".$newfilename;
$uploading = ftp_put($ftp_connector, "$destinationfile", "$sourcefile", FTP_BINARY);
if(!$uploading) {
echo "upload-error";
}
} else {
echo "connection-error";
}
ftp_quit($ftp_connector);
echo "<p>Stream closed!";
} else {
echo "transfer-error";
}
...
Is it helpfull?