Feeling Lucky with Yahoo!

So, one of the things I always use in Firefox is the auto Google Feeling Lucky feature. If you don’t know what I mean, then load Firefox and type php in the address bar. You will most likely go to http://www.php.net or a mirror of it. What is happening is Firefox is sending the words you type to the Google Feeling Lucky URL. That feature at Google then redirects you to the top ranked site for those terms. Its really handy for the PHP Manual for example. Just type php strtotime. You should be taken to the PHP Manual page for strtotime. Its really handy.

The only problem I have is that I like to use Yahoo! for search. There are a couple of reasons. One of the biggest is because they support the PHP community so much. Yahoo has Instant Search. They consider it to be an answer for Feeling Lucky, but it does me no good in this case.

I thought I was stuck until I discovered that Yahoo! offers RSS versions of searches. So, I wrote yahoo_luck.php. Its a simple little script that uses SimpleXML to grab a Yahoo! RSS search result and forward you on. I did put some backup in there for times when, for some reason, Yahoo! would not answer. Perhaps some of you Yahoo! guys in the PHP world can poke someone about that.

The one downside is that you will need your own web server. I tried to come up with some sort of javascript to do this. But, alas, I am not the JS wizard I wish I was. I am not even sure if the keywords.URL setting in Firefox could use JS.

To use this, just stick it on a server and replace keyword.URL in your Firefox about:config with http://www.example.com/yahoo_luck.php?s=. Enjoy.

Advertisements

3 Responses to Feeling Lucky with Yahoo!

  1. eels says:

    I’m not sure if there’s a difference (about Yahoo’s instant search), but, as far as “answering as you type” comes in http://www.google.com/webhp?complete=1&hl=en is much better :)

  2. Jad madi says:

    I really like to use Yahoo! search just because they are supporting PHP but in fact we can’t quit Googling as we are used to it.

  3. I cannot get the stumbleupon or get lucky features. Seems to me that it is for those with way too much time on thier hands

%d bloggers like this: