Home > Uncategorized > Egosurfing with PHP and Google

Egosurfing with PHP and Google

November 24th, 2004

From the first time I discovered Google WEB APIs, I thought that this thing is ideal to create an “ego-surfing” script, that is a script that looks up google for, let’s say, my name and returns the results.

I have written a small script that does exactly that (and obviously, you can put your name where it says “Panayotis Vryonis”). What you will need to use it, is

  • NuSOAP, the SOAP toolkit for PHP. You can find it here.
  • Your own Google Web APIs key, wich can be obtained here.

You may notice that the actual query is a bit more complex than a simple “Panayotis Vryonis”. The reason is I want to exclude results from my own pages, so I ask Google not to return results from g-metrics.com, vrypan.net and blogshares (which returned a number of results that were useles in this context.

A couple more notes taht could be useful:

  • You are allowed to make up to 1,000 queries/day to Google using your key, so if this is a public page, make sure you cache!
  • Each query will return a maximum of 10 results. See the commented out lines on how to get more results.

You may find a working example here :-)

Panayotis Uncategorized ,

  1. June 2nd, 2005 at 17:51 | #1

    Hi,

    I don’t know PHP. I coded my website in Perl. In case you are familiar with Perl, could you recommend me a good resource for taking advantage of the Google API?

    Thanks.

  1. December 19th, 2004 at 07:25 | #1