<? $downloadfile=$_GET['downloadfile']; if(isset($downloadfile)) { if(isset($_SERVER['HTTP_USER_AGENT']) and strpos($_SERVER['HTTP_USER_AGENT'],'MSIE')) Header('Content-Type: application/force-download'); else Header('Content-Type: application/octet-stream'); Header('Accept-Ranges: bytes'); //Header('Content-Length: '.filesize($downloadfile)); Header('Content-disposition: attachment; filename="'.$downloadfile.'"'); $downloadfile = getcwd()."\\$downloadfile"; echo file_get_contents("$downloadfile"); exit(); } ?>