I have written a
java program to do a google search for a query and get me the result.It returns an error.
It works fine if i use Yahoo search instead (god bless them). So i do not think tht the code is the issue.
This is the error i get:
java.io.IOException: Server returned HTTP response code: 406 for URL: http://www.google.com/search?q=[/B]
I tried to do some research and some said you have to fool google search into thinking that it is a browser request and to do it you need to add codes like
or
but I still get the same error. Any help/suggestions on resolving this issue is appreciated. Thanks.