Thursday, May 15, 2008

Add Searching to your Web Pages

[I did post this a few days ago, but noticed some minor teething problems and improvements that could be made with the program, so I deleted that post.]

As well as writing a Gauntlet remake, I've also managed to find time to write a webcrawler and search engine, which on the face of it is quite simple; it's just all the minor details that take the time. But hey, that's programming for you.

To add searching of your site to your site, simply add the following line to the HTML:

<script src="http://www.mysitesearcher.co.uk/mysitesearcher.js" type="text/javascript"></script>

You will probably be asking "What's the advantages over something like Google?". Good question, and I can think of 4 off the top of my head:
  1. Your site will be fully re-indexed at least every 6 hours. In fact, you can see exactly when your site was last indexed, plus how many words and URLs were read.
  2. This web crawler will also follow Javascript links.
  3. You can index just sub-directories. For example, if you place your searchbox at http://www.somedomain.com/mypages/mypage.html, only pages contained in http://www.somedomain.com/mypages (and its subdirectories) will be indexed, so you can search just your stuff.
  4. And, it's not Google, so you can have a clear conscience, safe in the knowledge that the Google-borg haven't absorbed you too.
So there it is. If you use it, let me know what you think. As you can see, I've added it to this site already.

More details are here.

No comments: