I have my below snippet that when I run it from my website, it returns the 
query to Yahoo, but all the links are screwed up?
 
How do I fix this? Also how can I add multiple searches to this for one call.
 
Thanks in advance.
 
#!/usr/bin/perl
use LWP::UserAgent;
print "Content-type: text/html\n\n";
my $ua = new LWP::UserAgent;
my $url = 
"http://search.yahoo.com/search?p=trucks&fr=yfp-t-501&toggle=1&cop=mss&ei=UTF-8";;
my $response = $ua->get($url);
if($response->content_type ne "text/html"){
die("Recieved content-type ".$response->content_type.", was
looking for text/html.")
}
my $content = $response->content; # $content now holds the html page from 
google.
print $content;

_________________________________________________________________
Bing™  brings you maps, menus, and reviews organized in one place.   Try it now.
http://www.bing.com/search?q=restaurants&form=MLOGEN&publ=WLHMTAG&crea=TEXT_MLOGEN_Core_tagline_local_1x1
_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to