src/Files.php
static function downloadToTempfile($url) {
        $download_path = Files::getTempFilename();
        $fp = fopen($download_path, 'w+');
        fwrite($fp, file_get_contents($url));
        fclose($fp);
        return $download_path;
    }
static function downloadToTempfile($url) {
        $download_path = Files::getTempFilename();
        $fp = fopen($download_path, 'w+');
        fwrite($fp, file_get_contents($url));
        fclose($fp);
        return $download_path;
    }
static function downloadToTempfile ( $ url ) { $ download_path = Files :: getTempFilename ( ) ; $ fp = fopen ( $ download_path , 'w+' ) ; fwrite ( $ fp , file_get_contents ( $ url ) ) ; fclose ( $ fp ) ; return $ download_path ; }
Downloads file and returns the temporary filename.

@param $url
@return bool|string
Downloads file and returns the temporary filename .