use LWP;
use CGI qw(:standard);
$CGI::POST_MAX=1024 * 100; # max 100K posts
my($qCGI) = new CGI();
my($YahooAppID) = "APPIDHERE";my($baseUrl) = "http://api.search.yahoo.com/
ContentAnalysisService/V1/termExtraction";my($context)= $qCGI->param('context');
my($query) = $qCGI->param('query');
my($finalUrl) = $baseUrl ;$ua = LWP::UserAgent->new;
$ua->agent("YahooPassThrough/0.1 ");# Create a request
my $req = HTTP::Request->new(POST => $finalUrl);
$req->content("appid=".$YahooAppID."&context=".$context."&query".$query);
$req->content_type('application/x-www-form-urlencoded');# Pass request to the user agent and get a response back
my $res = $ua->request($req);
print "Content-type: text/xml\n\n";
print $res->content;
Technorati Tags |
Cross Site Scripting [feed], Web Browser [feed], Internet Explorer [feed], Perl [feed], Api [feed], Ie7 [feed], Firefox [feed], Yahoo [feed], Ie6 [feed], Ajax [feed], Proxy [feed], Xml [feed] |