I try to download file using a php-script from an URL like the following:
http://www.xcontest.org/track.php?t=2avxjsv1.igc
The code I use l
I had some issues making the (File Download Dialog Box) show up when using Curl until i did this :
// $ch = curl_init();
// curl_setopt($ch, CURLOPT_URL, $url);
// Other Curl options ....
$output = curl_exec($ch);
if (isset($_POST["downloadExcelFile"])){
// in my code the "downloadExcelFile" field
// is sent when i'm trying to download an excel file
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment;filename="file.xls"');
header('Cache-Control: max-age=0');
$fp = fopen("php://output", 'w');
fwrite($fp, $output );
fclose($fp);
}