Search Someone Else's Database
Ever been into a page and the author invites you to search
Yahoo or Webcrawler right from his or her own page? You think this person must be pretty high
up the ladder to be able to pull off this kind of deal. Not really -- anyone can do it. Here's an
example:
Search Excite Here:
Search Webcrawler Here:
Search Yahoo Here:
Go ahead, enter a word -- nothing dirty, mind you! The
results of your search will be returned straightaway.
...waiting ...waiting ...waiting
Ah, good. You're back. Neat, huh? Actually, I lied above (and
I may lie down below). The BHS site didn't perform any of the searches. They were done by
Yahoo, Webcrawler, or Excite, depending on which one you chose. I just initiated the search.
When you got your results, did you notice that you were no longer in Kansas, or Texas for that
matter, any more? You were at the site of the search engine you chose.
How I Did It
Let's look at the code used to create the Yahoo search
above:
<form action="http://search.yahoo.com/bin/search">
<input size=30 name=p>
<input type=submit value="Search">
</form>
Notice it's a simple set of form commands, set up much like
you would to create a link button or a simple mailto: guestbook. However, in this case you are using the form to send the
information contained within the text box to a search engine. That's what you call the actual
program that searches the Yahoo database, a "search engine." In the example up above, you are
sending the info to Yahoo's CGI bin to be worked on by something called "search."
Here are the Webcrawler and Excite lines from
above:
<FORM NAME="wcsearchform" ACTION="http://webcrawler.com/cgi-bin/WebQuery"
METHOD="GET">
<FORM NAME="search" ACTION="http://www.excite.com/search.gw"
METHOD="get">
Notice they also sent the output of the text box to a search
engine. One goes to something called "WebQuery" and the other goes to "search.gw." Once the
data is sent to the search engine, then the site's database is searched and you get your
results.
But note again that you do not use this site to search -- you
only send the information from this site. Once that's done, BHS is totally out of the picture and
you're at the search engine's site.
Once more thing... Notice the "METHOD" in the two
above, and the name="p" in the Yahoo search above? Those are little items that each search
engine uses to denote how to manipulate the data it receives and what to name the output sent
through the text box. Each search engine will work differently and you must make sure you use
the search engine's format, exactly, on your page.
Where Do I Get The Format
Right from the search engine itself. It's not that tough. Go to
the search engine site and look at the source code. It's written right there. Just grab the part that
starts the form through the /form. Now, you may need to knock out some stuff in the middle, like
extra text or table commands, but it's all right there. Then put it on your page.
One thing though, you may notice when you get the code that
the ACTION section does not include the entire address to the search engine. That's because it
didn't need it when it was on their site. Now it's on your site and it needs it. Add the full address
before the search stuff. Without it, the data looks for something on your site that will do the
search. No dice... errors all over the place.
How Many Search Engines Are There
Tons. Now wait... yes. Tons. Here are few of the biggies:
[Alta Vista]
[Apollo]
[Bizwiz]
[ComFind]
[Excite]
[The Web Magazine]
[Pronett]
[HotBot]
[Infoseek]
[Lycos]
[Nerd World
Media]
[LinkStar]
[Mallpark]
[WebCrawler]
[ImageSurfer]
[AAA
Matilda]
[What's New
Too!]
[DejaNews]
[WebDirect!]
[Yellow Pages Online]
Here are some pages with multiple search engines....
[More]
[Dr.
Webster's Big Page of Search Engines]
[Beaucoup
Search Engines]
[Search.com]
Enjoy!