Jump to content

Mike41692

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by Mike41692

  1. I own a image hosting website and i would like for my members to be able to upload files from a offsite url not from there hard drive i found this code on the internet and i would like to know if i can restrict the file types

    if ($_GET[xfer]) {if ($_POST[from] == "") {print "You forgot to enter a url.";} else {copy("$_POST[from]", "$_POST[to]");$size = round((filesize($_POST[to])/76800000), 3);print "transfer complete.<br><a><a href=\"$_POST[from]\">$_POST[from]</a><br><a><a href=\"$_POST[to]\">$_POST[name]$_POST[to]</a><br/><br/>";}} else {print "<form action=\"$PHP_SELF?xfer=true&type=url\" method=post>From URL: <input name=\"from\"><br>New file name: <input name=to> <br/><br/><input type=submit value=\"Upload\"><br/><br/>";}

  2. I would like to know if its possible to restrict the file types that people are allowed to copy using copy() and if it can somebody please tell me how

×
×
  • Create New...