LWP Help
by Steve Silvers other posts by this author
Jun 17 2009 9:27AM messages near this date
view in the new Beta List Site
RE: :FTP pasv_xfer() using problem
|
RE: LWP Help
I have my below snippet that when I run it from my website, it returns the query to Yahoo, b
ut 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_tagl
ine_local_1x1
Thread:
Steve Silvers
Brian Raven
|