Egosurfing with PHP and Google

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 :-)

Post comment as twitter logo facebook logo
Sort: Newest | Oldest

Trackbacks

  1. ??BLOG says:

    Ego Surfing = Ego + Surfing
    Ego Surfing: ????

    1 Surfing your server logs (aka referers) to see who has linked to your site.
    ???????????Referer?????????????

    2 Searching Google for your name to see who is talking about you…