Just the other day, there was someone I was talking to that wanted to create a search engine in PHP. Unfortunately, I didn't have a good place to refer him to for some examples. Well, it looks like DevArticles has just provided that place.
In their latest, Building A Search Engine, the author shows you, the PHP coder out there, how to create something that will go out, grab a page, grab all the words on that page, and plop them down in a database for later searching. Yes, it's all keyword searching, and they're all stored in the DB, so they're not really "in sync" with the real world pages, but that's easily fixed. Also of note, they take it one step further and help you put an index on the keyword search column to help speed up the searching just a bit.
This method is a good idea, and can be much quicker than actually trying to search out the pages themselves - especially if they require a lot of dynamic content. So, all that's left is to set up a cron to wipe the DB nightly and reimport the pages, and you're all set!




