I need a little code to upload a file from a link and then treat as a $_FILES['filelink'].. so it can be processed through my script.
so the url will be posted and will show as
if(!$_FILES['file']){
$file = $_POST['filelink'];
} else {
$file = $_FILES['file'];
}
then it needs to be coded here so its ready for the next stage
if (!isset($_FILES["file"]))
bark("missing form data");
$f = $file; //$_FILES["file"];
$fname = unesc($f["name"]);
if (empty($fname))
bark("Empty filename!");
if (eregi("http:", $fname) || eregi("www\.", $fname))
bark("Filename cannot contain a URL!");
$tmpname = $f["tmp_name"];
if (!is_uploaded_file($tmpname))
bark("eek");