<?
// DOWNLOAD REMOTE FILE
// this is a-lot more complicated than it looks
// $url is the url of the file, must have fopen wrappers enabled
// $dir is the directory to save the file to relative to the current working directory
// file is saved with the same file name from its source
function getfile($url, $dir){
file_put_contents($dir.substr($url,strrpos($url,'/'),strlen($url)), file_get_contents($url));
}
?>