cURL / Mailing Lists / curl-users / Single Mail

curl-users

curl and php

From: zafar iqbal <iqbalz82_at_hotmail.com>
Date: Fri, 13 Feb 2004 15:52:22 +0000
When i use the following example i seem to receive nothing.  the error message is connect failed.  The site is correct, i tried it maually i am not sure it happens
 
//<pre>  
 <?php
$ch = curl_init("http://www.zend.com");
$fp = fopen("test.txt", "w");
curl_setopt($ch, CURLOPT_FILE, $fp);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch);
print_r(curl_getinfo($ch)); 
echo "\n\ncURL error number:" .curl_errno($ch); 
echo "\n\ncURL error:" . curl_error($ch); 
// ...close cURL handle ($ch) below
//</pre>
curl_close($ch);
fclose($fp);
?>
 
zaf


Subscribe to MSN 8 today for a better internet experience and save over 25% on the usual price! Received on 2004-02-15