dannyman.toldme.com


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

Comment

Leave a comment . . .

Tiny Print:

  1. For private messages, e-mail me: dannyman@toldme.com.
  2. You must provide an e-mail address.
  3. You can use a bogus e-mail address, but I like to know who you are.
  4. I will not spam you. I will not publish or share your e-mail address.
  5. First-time commenters will be held for review.
  6. You can use these HTML tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>