curl-and-php
Re: meaningless characters
Date: Mon, 17 Feb 2003 06:06:37 -0800 (PST)
here is the php code that i use to get html in $buffer:
ob_start();
                                
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE
5.01; Windows NT 5.0)");
$de = curl_exec($ch);
                        
$buffer = ob_get_contents();
ob_end_clean();
                        
if (!$buffer) 
{ 
        echo "buffer yok!"; 
        echo curl_error($ch);
        curl_close($ch);
        exit;
}
                
curl_close($ch);
my php version is 4.2.3
curl info : libcurl 7.9.8 (OpenSSL 0.9.6a) (ipv6 enabled)
machine: unix
__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-02-17