Hi,
je**********@gmail.com wrote:
I am creating a webpage for my office. The start page is a search
engine that searches a company database.
it consists of a text box and a button called search.
I was wondering if i could add another button that would say 'Search
Internet' and if the user selects this redirect to google or yahoo or
whatever given keywords that they enterd in the text box.
thanks
redhanz
Google has many APIs, which are rather easy to use. Check this page for
the Google Search APIs:
http://code.google.com/
Since Google uses GET in their search pages, it's quite easy to find out
which is the query string syntax. For example, a search for Laurent
Bugnion has this form:
http://www.google.ch/search?hl=en&q=...e+Search&meta=
The parameter "hl" is obviously for the language, and "q" is the
question. A simple try confirms it:
http://www.google.ch/search?hl=de&q=Lords+of+the+rings
This self-made URL returns a page in german with "Lords of the rings" as
search string. So it's quite easy to send a search request to Google
without using any API if needed.
HTH,
Laurent
--
Laurent Bugnion [MVP ASP.NET]
Software engineering:
http://www.galasoft-LB.ch
PhotoAlbum:
http://www.galasoft-LB.ch/pictures
Support children in Calcutta:
http://www.calcutta-espoir.ch