jigen7 Posted September 18, 2007 Share Posted September 18, 2007 i have here a function that search google using curl library what i want is i want to return the top 5 url that what i dont knwo ho to do it anyone??thx 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); Link to comment https://forums.phpfreaks.com/topic/69724-getting-the-top-5-url-in-google-search-using-curl-library/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.