Searching a site with google
BoBB
plug-discuss@lists.plug.phoenix.az.us
Thu, 31 Oct 2002 06:48:20 -0700
Okay i am setting up a little web portal of my own to use as my home page. Trying to figure out how to get google to search on a cetain site. I poked around on some sites that had something like that and from looking at the source i came up with this. Its not working properly and im sure i did something utterly stupid but if someone can point it out to me i would appreciate it very much :)
<FORM ACTION="http://www.google.com/custom">
<input TYPE="hidden" NAME="site" VALUE="search">
<input TYPE="hidden" NAME="hl" VALUE="en">
<input TYPE="hidden" NAME="num" VALUE="50">
<input TYPE="hidden" NAME="lr" VALUE="lang_en">
<input TYPE="hidden" NAME="ie" VALUE="ISO-8859-1">
<input TYPE="hidden" NAME="safe" VALUE="off">
<INPUT TYPE="HIDDEN" NAME="DOMAINS" VALUE="www.gentoo.org">
<INPUT TYPE=TEXT NAME="q" SIZE="16" MAXLENGTH="2048" VALUE="">
<INPUT TYPE=SUBMIT NAME="btnG" VALUE="Go">
</FORM>
Alot of that stuff is from my preferences, like the 50 search results and the english only results(i hate getting 200 results and looking through all of them to see none of them are english) Most of this is also guess work as ive never done anything like this before :P Done some html but nothing with forms. Here is a working one that i pretty much just followed the form of to no avail =/
<form ACTION="http://www.google.com/linux">
<input TYPE="hidden" NAME="site" VALUE="search">
<input TYPE="hidden" NAME="restrict" VALUE="linux">
<input TYPE="hidden" NAME="hl" VALUE="en">
<input TYPE="hidden" NAME="num" VALUE="50">
<input TYPE="hidden" NAME="lr" VALUE="lang_en">
<input TYPE="hidden" NAME="ie" VALUE="ISO-8859-1">
<input TYPE="hidden" NAME="safe" VALUE="off">
<input TYPE=text NAME="q" SIZE="16" MAXLENGTH="2048" VALUE="">
<input TYPE=submit NAME=btnG VALUE="Go">
</form>
That one searches google.com/linux :) Thanks in advance for any and all help.
--
BoBB