Helping ordinary people create extraordinary websites!
$1 CPM Advertising For A Limited Time Only
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Email:

PHP Site Search Made Easy

By Akash Mehta
2008-03-30


Why site search?

When users want to find information on your website, they first look for a search box. Failing that, they head back to Google - potentially finding a competing site and taking their business elsewhere, or simply becoming frustrated with your service. But implementing effective search doesn't have to be hard. In this tutorial, I'll show you how to build a basic site-specific web search in just five lines of code, using the Yahoo! APIs.

Today's websites have a lot of content. Wikipedia, for example, can compress absolutely all its content into one 6.4 GB archive. And that's before it decompresses to up to 20 times that. Needless to say, effectively searching all that data can be a real challenge, and chances are at the end of the day you'll still be stuck with a slow and ineffective search system. Your users will resort to using Google or Yahoo to search for your content. Unless you have an experienced user base that will use the site: parameter, however, chances are they'll end up on a site other than your own.

Well, at least they got their search results quickly, some might think. But it doesn't have to be that way. With many of te popular web search providers offering APIs, you can quickly use the power of their engines and the quality of their indexes to give your users high quality search any way you want it. Forget Google's "customised site search" box, where you send the user to Google with nothing but a few site parameters. Using APIs, you can do whatever you want. Search only for registered users? Sure. Showing an actual image from the page next to a lesult? You got it. AJAX result loading? Absolutely. Anything to get a real, effective site search to your users.



Tutorial Pages:
» Why site search?
» A brief crash course on search APIs
» Building a real site search system
» Further reading


Related Tutorials:
» Zend Framework Tutorial
» Port Scanning and Service Status Checking in PHP
» Web Database Access from Desktop Applications
» CubeCart 3.0 Installation and Configuration
» Installing and Configuring Drupal 6.1
» Desktop Application Development with PHP-GTK

Ask A Question
characters left.