Monday, August 11, 2008

PHP Firefox Search Plugin

I started a new job today and as I was setting up my workspace, I decided to create a simple php search plugin for firefox. You can usually locate these search engines in firefox at the top left corner.

It turns out this is a very simple process and involves creating an open search xml document. From what I understand even internet explorer supports this format.

The hardest thing was to get the php icon afixed to my plugin. I downloaded the ico file from http://www.php.net/download-logos.php. I then wrote a quick php script to base 64 encode it so that I could plop it into my xml document without having to worry about hosting the image somewhere.

Unfortunatly, since blogger doesn't let me upload arbitrary files for linking into this post. I had to upload my work to my server. If you are interested you can find it here http://fiwizone.com/alex/phpNet.xml

Much later after doing some poking, I found out that there was an open search document for php.net already written and posted on the php.net website. You can find it at http://us3.php.net/phpnetimprovedsearch.src