Gdzieś tu to trzeba wsadzic:
Kod: Zaznacz cały
//My FTP .torrent upload hack
$ftp_server = "ftp.ADDRESS OF FTP SERVER HERE.com";
$destination_file=$id;
$source_file =$tmpname;
$ftp_user = "USER NAME TO FTP SERVER";
$ftp_pass = "PASSWORD TO FTP SERVER";
// set up a connection or die
$conn_id = ftp_connect($ftp_server) or die("Couldn't connect to $ftp_server");
// try to login
if (@ftp_login($conn_id, $ftp_user, $ftp_pass)) {
echo "<br>\n";
} else {
echo "Couldn't connect as $ftp_user<br>\n";
}
$upload = ftp_put($conn_id,"$destination_file.torrent", $source_file, FTP_BINARY);
ftp_quit($conn_id);