01-04-2011, 12:04 AM
|
#1 (permalink)
|
|
The Acquainted
Join Date: Feb 2008
Posts: 107
Thanks: 3
|
Strange Curl problem
I am trying to get content from Bing Cache url. $bingurl is the url of the bing cache page. I echo $bingurl, it echos
http://cc.bingj.com/cache.aspx?d=489...763&w=4da51025
it means the url is correct. So I use
PHP Code:
curl_setopt($ch, CURLOPT_URL, $bingurl); curl_setopt($ch,CURLOPT_RETURNTRANSFER,true); $satir = curl_exec($ch); curl_close($ch); preg_match_all('#<h1(.*?)</h1>#si', $satir, $soru2);
echo $soru[1][0];
But it doesnt get the content, however, if I use the code within like that,
PHP Code:
curl_setopt($ch, CURLOPT_URL, "http://cc.bingj.com/cache.aspx?d=4893209150818763&w=4da51025");
It works. What the hell ? :D
|
|
|