• 0

JAVA - Receiving 403 and/or 405 Error


Question

Hi,

I am making an application to get the top 10 results from google for a given keyword. I tried two methods but both of them didn't give me the desired result.

For example, I simply tried to read the contents of the given URL, "http://www.google.com/search?hl=en&q=test" but it returned a 403 error.

So, I thought may be I have to use the Post method, but it returned a 405 error.

Any tips or suggestions?

Thanks a lot in advance!

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

Thanks for the info MrA, I wasn't aware of the TOS. What would be a good strategy to incorporate the AJAX Search API in a JAVA Application?

I took a quick look at the AJAX API, and the only way I can make it work is incorporating a browser within my application.

Link to comment
Share on other sites

  • 0
Thanks for the info MrA, I wasn't aware of the TOS. What would be a good strategy to incorporate the AJAX Search API in a JAVA Application?

I took a quick look at the AJAX API, and the only way I can make it work is incorporating a browser within my application.

Not true. Despite the naming, the AJAX API is intended for ALL users, not just the browser ones. Its called AJAX because it uses JSON as the browser/server interface. See Fash and other non-Javascript Environments in the developers guide. You'll need a JSON parser, which for Java, you can get @ http://www.json.org/java/

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.