The last time I checked Google explicitly blocked the default LWP user agent. If you set the user agent to a different name (via LWP::UserAgent), the request should work.
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Peter Eisengrein Sent: Friday, March 25, 2005 9:48 AM To: 'Chris'; perl-win32-users Subject: RE: Google API When I use the following code: use LWP::Simple; getprint("http://www.google.com/search?q=perl"); I get: 403 Forbidden <URL:http://www.google.com/search?q=perl> But when I do this: use LWP::Simple; getprint("http://www.google.com/"); I get the HTML in return. So, it might be Google that is blocking the query unless, of course, there is something different in how LWP::Simple packages the request compared to my browser. FWIW, the response is pretty fast. > -----Original Message----- > From: Chris [mailto:[EMAIL PROTECTED] > Sent: Friday, March 25, 2005 10:43 AM > To: perl-win32-users > Subject: Google API > > > All, > > I'm trying to display Google search results from within > another site. I've > tried DBD::Google (Net::Google) & making direct requests via > SOAP::Lite. > Both seem to take 3-5 seconds to produce 10 results (too slow > for me). Is > their a faster way? > > > - Chris > > _______________________________________________ > Perl-Win32-Users mailing list > [email protected] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > > > > __________________________________________________________ > This message was scanned by ATX > 10:46:02 AM ET - 3/25/2005 > _______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs _______________________________________________ Perl-Win32-Users mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
