curl-and-php
Re: meaningless characters
From: Daniel Stenberg <daniel_at_haxx.se>
Date: Mon, 17 Feb 2003 15:50:52 +0100 (CET)
Date: Mon, 17 Feb 2003 15:50:52 +0100 (CET)
On Mon, 17 Feb 2003, Cenk Uysal wrote:
> 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();
I have absolutely no idea. I'm not a PHP hacker, and thus when things like
ob_get_contents() enters, I'm lost.
Anyone else?
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sfReceived on 2003-02-17