Search code examples
getargumentsgoogle-custom-search

Make Google Custom Search look at GET parameters


I have a Google Custom Search snippet in a page, say search.php and it seems to work fine if I use it from that page.

However, I'd need to somehow make it recognize GET arguments, so that for instance if I loaded search.php?q=test, it would directly search for test.

Is there a way to make it do that?


Solution

  • I found I can use CustomSearchControl's execute method.