September 30, 2002

Sample code for focused custom Google search

The site search feature of Google's free custom search offering works by default only for sites whose addresses are root-level URLs (so, for example, you can use it out-of-the-box to search jrobb.userland.com or blogs.salon.com but not blogs.salon.com/0001111/).

With the help of Ian Landsman and a few other readers over the weekend, I've come up with code that produces a custom Google search of just this blog. I've in fact replaced my calendar with it (well, I've moved the calendar to the bottom of my masthead column anyway, on the theory that robots may still find it useful).

I want to offer the code to anyone to copy and tweak, but I've learned that posting code (even escaped-out code) to a blog entry tends to upset news aggregators, so instead I've written up the learning process with a few code samples as a story.

Posted by xian at September 30, 2002 10:45 AM
Other incoming links (via Technorati)

Hosted by Mediajunkie.

Sponsors
On this day in 2004
You know you're obsessed with blogging when: You lie about the size of your readership... in a dream.... (Weblog Concepts)
On this day in 2003
Blogs briefing the press: Billmon think's truly pathetic that journalists are getting their background on the Plame Affair from blogs, but one of his commenters points out that its the journalists who aren't reading blogs who are harder to understand. It's a great thread, not least because it includes this rewrite of Shakespeare by "Monica":... (Politics)