Cheers,
Nicholas Sherlock
"Tom B" <tom@N_O-S_P_A_Mtommyboytjb.fsnet.co.uk> wrote in message
news:lo4b3v86ra52fucnl...@4ax.com...
> How would I do something like that?
>
> Thanks,
>
> Tom
> I'm getting a "HTTP/1.1 403 Forbidden." error, showing in a message
> box.
There's nothing wrong with your code, or the Indy library. If you'll read
the entire 403 response message, you'll see it's just a little Google
arrogance about how and when you can use their search listings.
It seems that any request having a user agent other those on the Google
approved list will be blocked - because they obviously are breaking the
Google terms of service.
My advice is to use another (more reasonable) search service...
Here's the content that I received:
===========
Forbidden
Your client does not have permission to get URL
<code>/search?q=test</code>
from this server.(Client IP address: 999.999.999.999)
Please see Google's Terms of Service posted at
http://www.google.com/terms_of_service.html
If you believe that you have received this response in error, please send
email to
<a href="mailto:forb...@google.com">forb...@google.com</a>.
Before sending this email, however, please make sure to take a look at our
Terms of Service
(http://www.google.com/terms_of_service.html).
In your email, please send us the <b>entire</b> code displayed below. Please
also send us any information you may know about how you are performing your
Google searches-- for example, "I'm using the Opera browser on Linux to do
searches from home. My Internet access is through a dial-up
account I have with the FooCorp ISP." or "I'm using the Konqueror browser on
Linux to search from my job at myFoo.com. My machine's IP address is
10.20.30.40, but all of myFoo's web traffic goes through some kind of proxy
server whose IP address is 10.11.12.13." (If you don't know any information
like this, that's OK. But this kind of information can help us track down
problems, so please tell us what you can.)
We will use all this information to diagnose the problem, and we'll
hopefully have you back up and Googlin' again quickly!
Please note that although we read all the email we receive, we are not
always able to send a personal response to each and every email. So don't
despair if you don't hear back from us!
Also note that if you do not send us the <b>entire</b> code below, <i>we
will not be able to help you</i>.
Best wishes,
The Google Team
===========
--
Don Siders [Team Indy]
Join the Indy Docs project! (http://www.indyproject.org/teams/docs)
ELKNews - Get your free copy at http://www.atozedsoftware.com
Bas
"Tom B" <tom@N_O-S_P_A_Mtommyboytjb.fsnet.co.uk> wrote in message
> iirc google has some kind of interface you can query, which returns the
> results in XML-format.
There is the Google API beta at http://www.google.com/apis/.
--
Don
Or set the IdHTTP component to make it look like IE.
Mike
> > My advice is to use another (more reasonable) search service...
>
> Or set the IdHTTP component to make it look like IE.
True. There's always that, too.
--
Don
> What did you mean, "set it to look like IE"?
Change the TIdHttp.Request.UserAgent.
Ken
---
Ken White
kwh...@adpsi.com
Clipper Functions for Delphi and C++ Builder
http://www.adpsi.com