curl-and-php
(no subject)
Date: Mon, 17 Sep 2007 21:57:03 -0700 (PDT)
i have here a function(easy function) that search
google for a certain keyword using curl library what i
want is i want to return the top 5 url of the search
result thats what i dont know how to do it
anyone??thanks
function curl_google($keyword){
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,
'http://www.google.com/search?hl=en&q='.urlencode($keyword).'&btnG=Google+Search&meta=');
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_FILETIME, true);
$data = curl_exec($ch);
curl_close($ch);
}
____________________________________________________________________________________
Luggage? GPS? Comic books?
Check out fitting gifts for grads at Yahoo! Search
http://search.yahoo.com/search?fr=oni_on_mail&p=graduation+gifts&cs=bz
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-09-18