Patrik Hasibuan wrote:
I can retrieve a content of simple url such as: "http://www.for-success.info"; with LWP::Simple.

But if I retrieve a little bit more complicated url such as "http://www.google.com/search?q=silicon+valley&start=20"; causes error.

Google seems to not like requests from Perl scripts. If you use LWP::UserAgent instead, and prevent that the client identifier is sent to the server by including

    $ua->agent('');

in your script, it works. Another thing is whether you are allowed to use Google Search that way...

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to