>   $ch = curl_init($url);
>   $fp = fopen('/tmp/curl.out', 'w');
>   curl_setopt($ch, CURLOPT_FILE, $fp);
>   curl_exec($ch);
> 
> Error checking etc. is of course left up to you. :)

oops, I sent directly the file name. Let me reformulate the code then:


set_time_limit(0);
$fp = fopen('stream.bin', 'wb');
$ch = curl_init($siteURL);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 0);
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_exec($ch);
fclose($fp);

Apologize I did not test it before.

Regards

                                          
_________________________________________________________________
Windows Live: Friends get your Flickr, Yelp, and Digg updates when they e-mail 
you.
http://www.microsoft.com/middleeast/windows/windowslive/see-it-in-action/social-network-basics.aspx?ocid=PID23461::T:WLMTAGL:ON:WL:en-xm:SI_SB_3:092010

Reply via email to