in reply to How to call google search in Perl/CGI script
!/usr/bin/perl -w use SOAP::Lite; my $query = "perl"; my $googleSearch = SOAP::Lite -> service("http://api.google.com/Google +Search.wsdl"); my $result = $googleSearch -> doGoogleSearch( "iwnUXUtHj3bteg5FWfBJDwui3SPeB+iy", # password to access googl +e $query, 0, # Fisrt result 10, # Number of results "false", # Filter '', # Restriction "false", # Secure Search '', # lr 'latin1', # ie 'latin1' # oe ); print $result->{resultElements}->[0]->{title}; print "\n"; print $result->{resultElements}->[0]->{URL}; print "\n"; 1;
|
---|
In Section
Seekers of Perl Wisdom