0

how do you open the user's default browser with a search engine like Google with a keyword already inputted into the searchbox?

1 Answers1

0

Google's query string looks like this:

https://www.google.co.uk/webhp?sourceid=chrome-instant&ion=1&ie=UTF-8#safe=off&sclient=psy-ab&q=Hello&oq=Hello&gs_l=hp.3..0l4.23251.23685.1.23755.5.5.0.0.0.0.101.388.4j1.5.0...0.0.0..1c.1.15.psy-ab.SImBV4TS8HQ&pbx=1&bav=on.2,or.r_cp.r_qf.&bvm=bv.47244034,d.d2k&fp=62ecb0084cfd0724&ion=1&biw=1511&bih=741

But the important bit is:

&q=Hello&oq=Hello

Set q and oq to the search value when you navigate to the website, and it will load up the search result for you.

Update

You only actually need to set q to your desired query.

christopher
  • 26,815
  • 5
  • 55
  • 89