Ben’s Weblog

I hate Illinois Nazis…

Parsing recent Google queries

Posted by Ben on August 9th, 2003

I added a new feature to the blog so that recent Google queries that led to this site are shown over on the right-hand bar. Click on more… for the gory details.

Here’s a link to the sourcecode:

http://www.ben-johnson.org/blog-073/refererLib.new.phps

Credit to Nathan Young (ncyoung.com) for giving us the original refererLib!

To use it, you already need to have the refererLib file installed and your database appropriately configured - this just works on the referers listed in the database. Here’s how I call it:

<?php
  $list = googleList(5);

  foreach ($list as $link){
  print "<li>$link</li>";
  }
?>

Enjoy!

3 Responses to “Parsing recent Google queries”

  1. X_A Says:

    Wow, very nice - I’ll say once again :) Heh, I was going to ask about the other aspects of your site like ‘recent referers’ and so forth - but it looks like your using Wordpress instead of B2 - so they might not be applicable for me anyway heh - good stuff eitherway!

  2. Antonio Says:

    The link ‘http://www.ben-johnson.org/blog/refererLib.new.phps’ don’t seems to work. Can you send me the “refererLib.new.phps”?

  3. ben Says:

    Link fixed, sorry!

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
The Flickr API returned error code #100: Invalid API Key (Key has expired)