dannyman.toldme.com

About Me : Free Style : Good Reads : News and Reaction : Photographs : Technical : Travels : Unsorted

Search:
May 30, 2008
Technical

HOWTO: Link to Google Search with hidden site: parameter

I was trying to hack up a little search box to access the local Google search appliance. I know you can search with a query like “foo site:example.com/docs” but I wanted to pass site: in as a form parameter. Here is an example of how to do that:

<form action="http://googleplex.example.com/search">
    <input type="text" name="q" />
    <input type="hidden" name="as_sitesearch" value="example.com/docs" />
</form>

So, where you might use site: in the search field, you use as_sitesearch as a hidden search parameter. I figured this out by squinting at the Google Advanced Search page.

Read More

Next:
Previous:
Categories: Technical
Possibly-Related Posts
Google.cn: “手气不错”
AdSense Suspended
Technology Companies: 2008 Profit-per-Employee
Keeping Up With Your Web: Google Reader and Google Chrome!
Google’s New Algorithm: QuitRank!
Windows 7 vs Ubuntu 9.10
When Will Google Voice Support Apps Users?

Comment

Leave a comment . . .

  1. You must provide an e-mail address.
  2. First-time comments will be held for review.
  3. Bogus e-mail addresses are lame, but will work.
  4. For private messages, e-mail me: dannyman@toldme.com.
  5. I will not spam you, and I will not publish or share your e-mail address.