Hi,
I need to know how could I download (kayak-fra-lax-20120423.csv) a file from the website http://www.kayak.com/#/flights/FRA-LAX/2012-04-23 using php. I am doing it with the next code.
<?php
header("Content-type: application/octet-stream");
header("Content-Disposition: attachment; filename=\"kayak-fra-lax-20120423.csv\"");
//$data="col1, col start and end col2,col3, \n";
//$data .= "seond linedata here from site to download col1";
//echo $data;
?>
But it shows me a new one.
Thanks in advance.
Get file from website with PHP
Moderator: General Moderators
Re: Get file from website with PHP
Have you looked at cURL?
Re: Get file from website with PHP
You can copy it to your server as long as you have the actual path to the CSV file (which that URL you posted is not).