4 ms·
Is there a way to generate a url for a particular query? I have a homepage with a bunch of search boxes. Incidentally, anyone know if there is a way to genera
by pg 17y ago
Is there a way to generate a url for a particular query? I have a homepage with a bunch of search boxes.
Incidentally, anyone know if there is a way to generate a url for a Twitter search? The one I had been using stopped working recently.
- chaosmachine 17y agoLike this? http://www.google.com/webhp?hl=all#hl=all&q=this http://www.google.com/webhp?hl=all#hl=all&q=this http://twitter.com/#search?q=this http://twitter.com/#search?q=this
- pg 17y agoI'm having trouble making an html form that will generate the request Google seems to need. Do you know what a form would have to look like? The Twitter url doesn't work for me, incidentally. I get a Twitter search page but with no query or search results.
- jarek 17y agoTry http://search.twitter.com/search?q=this http://search.twitter.com/search?q=this
- pg 17y agoGreat; this works: <form action="http://search.twitter.com/search" method="get"> <input type="text" size="30" name="q"/> </form>
- nostrademons 17y agoThe only thing Google needs is the q parameter: http://www.google.com/search?q=site:news.ycombinator.com%20google http://www.google.com/search?q=site:news.ycombinator.com%20g... You just need a form with action="http://www.google.com http://www.google.com and a text input of name "q", assuming you only care about English-only.
- pg 17y agoI'm not trying to generate an ordinary Google search. I'm trying to generate one with the clean search results pages Google had before the redesign, which you can get from the search page linked to in the OP: http://www.google.com/webhp?hl=all http://www.google.com/webhp?hl=all My question is how to make a web form that produces the same results as the page above.
- nostrademons 17y agohttp://www.google.com/search?q=site:news.ycombinator.com%20google&hl=all http://www.google.com/search?q=site:news.ycombinator.com%20g... i.e. put a hidden input with a hl=all in the form. (I make no warranties about this hack continuing to work past next week.)
- pg 17y agoThat works. Thank you so much! What a relief. <form action="http://google.com/search" method=get> <input type=text value="" name=q size=30> <input type=submit value="Go"> <input name=hl type=hidden value="all"> </form>