Problem with perl & google

A

A. Sinan Unur

This sample work:

$URL="http://search.yahoo.com/search?p=perl&fr=FP-tab-web-t&toggle=1 &co
p=&ei =UTF-8";
use LWP::Simple;
unless (defined ($webstr = get $URL)){die "could not get
$URL\n";} print $webstr;
But this don't:
$URL="http://www.google.com/search?hl=hr&q=perl&lr=";
use LWP::Simple;
unless (defined ($webstr = get $URL)){die "could not get
$URL\n";} print $webstr;
Why is problem with google?

You should always ask the computer *why* something failed, and report it
when you are posting here.

D:\Home\asu1\UseNet\clpmisc> wget
"http://www.google.com/search?hl=hr&q=perl&lr= "
--07:23:55-- http://www.google.com/search?hl=hr&q=perl&lr=
=> `search@hl=hr&q=perl&lr='
Resolving www.google.com... 64.233.161.99, 64.233.161.104,
64.233.161.147 Connecting to www.google.com|64.233.161.99|:80...
connected. HTTP request sent, awaiting response... 403 Forbidden
07:23:56 ERROR 403: Forbidden.

You are violating the Google TOS.

http://www.google.com/apis/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top