If you want to search some websites, there are two ways:
1. You create your own search engine, which includes a web crawler, full text search mechanism and a database to store indexed data.
2. Use Google search instead. This way is much easier.
You just have to create a search form like this:
<form method="get" action="http://www.google.com/search">
<input type="text" name="q" maxlength="255" value="" />
<input type="submit" value="Search" />
<input type="hidden" name="sitesearch" value="yoursite.com" />
</form>