In a PHP script I want to get just the URL of the top result of a Google search and redirect to it. I could scrape it but is there a better way?
+9
A:
Use the I'm Feeling Lucky function.
Example:
http://www.google.com/search?hl=en&q=stackoverflow&btnI=I'm+Feeling+Lucky&aq=f&oq=
It automatically takes you to the top result.
Michael Haren
2008-11-05 02:55:31
Ah of course! That should work, thanks!
yjerem
2008-11-05 02:59:35