Server to server file transfer script!
Posted: Sun Nov 27, 2005 11:13 am
				
				Simply copy this into a PHP file and save it onto your website:
When you have done that, make a directory in the same place as this script called 'files' and CHMOD it to 0777. When you have done that, it should work fine 
 .
If you have any questions or anything then just let me know
 .
			Code: Select all
<?
if ($_GET[act])
{
   if ($_POST[from] == "")
      {
         print "You need to enter the URL of the file.";
      }
   else
   {
      copy("$_POST[from]", "files/$_POST[to]");
      $size = round((filesize("files/$_POST[to]")/1000000), 3);
      print "Success! The file <a><a href=\"$_POST[from]\">$_POST[from]</a> is now stored on our server. You can view it here:
      <a><a href=\"files/$_POST[to]\">$_POST[to]</a> $size MB";
   }
}
else
{
   print "<form action=\"$PHP_SELF?act=transload\" method=post>
   URL of file: <input name=from>
   New filename: <input name=to>
   <input type=submit value=\"Transload file!\">";
}
?>
If you have any questions or anything then just let me know