cURL / Mailing Lists / curl-and-php / Single Mail

curl-and-php

Searching google result

From: jigen <i_love_jigen_at_yahoo.com>
Date: Mon, 17 Sep 2007 21:57:47 -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);

}

       
____________________________________________________________________________________
Yahoo! oneSearch: Finally, mobile search
that gives answers, not web links.
http://mobile.yahoo.com/mobileweb/onesearch?refer=1ONXIC
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-php
Received on 2007-09-18