|
Posted by gehegeradeaus on 09/14/06 14:27
I used curl a few times now, and it always worked fine... but now I
have a little question:
If I post to a certain url , and that page returns a file for download.
(it doesn't display anything)
How can accept the download, and read the contents...?
My code :
$postarr["user"] = "user";
$postarr["pw"] = "pw";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://www.website.com/page.asp");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postarr);
$data = curl_exec($ch);
curl_close($ch);
Tia!
Navigation:
[Reply to this message]
|