cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: curl - resolve http requst on terminal but not in my program

From: Jochen Roderburg <Roderburg_at_uni-koeln.de>
Date: Thu, 11 Sep 2008 16:56:38 +0200

Zitat von "Dan Fandrich" <dan_at_coneharvesters.com>:

> Your original curl command-line is about the most simple you could imagine.
> The only complication is setting the proxy, and you've left out that
> information. Google is very sensitive about the requests it gets and rejects
> anything that it thinks is a spider. The other thing I see missing from
> your log is a User-Agent, and that's definitely something that could cause
> problems in this case. Try using the -v option on the curl command-line and
> compare the request that curl sends with that sent by your program.

They definitely seem to want a User-Agent header there. If you do the
command line call without one as in
curl -A "" "http://mt1.google.com/mt?x=92&y=200&zoom=8" -o "file1"
you also get a "403 Forbidden" error and find the following text in
the output:

Google Error
We're sorry...

... but your query looks similar to automated requests from a computer
virus or spyware application. To protect our users, we can't process
your request right now.

Best regards,

Jochen Roderburg
ZAIK/RRZK
University of Cologne
Robert-Koch-Str. 10 Tel.: +49-221/478-7024
D-50931 Koeln E-Mail: Roderburg_at_Uni-Koeln.DE
Germany

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-09-11