curl-and-php
Re: How to download a file that has no extension in url? or bypass download prompt?
From: haroon ahmad <haroon_at_fastcreators.com>
Date: Sun, 9 Nov 2008 23:45:28 +0500
Date: Sun, 9 Nov 2008 23:45:28 +0500
The point you are not getting is that the file download prompt is a "browser
thing" when you are following the location in cURL then you should get the
final output of the csv file in curl_exec call. You can simply
$output=curl_exec($ses);
$fh=fopen("file.csv","w");
fwrite($fh,$output);
fclose($fh);
then check he file.csv on your script location.
Hope this helps,
Haroon Ahmad
PHP Web Developer
www.haroonahmad.co.uk
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2008-11-09