Proxy Script To Yahoo Related Searches

One of the other features that my AJAX application had was Related Searches. This API connected to the Yahoo API and performed a query. The query is a single search term; the results are searches that a User could perform to get similar results.For instance if you were to put the keyword “Kinlan” into the API, it might bring back searches that would related to “Kinlan”, so “Funky Person, Cool Dude and Amazing Geeza” might be some of the searhes that would also relate to the topic of Kinlan.


This content originally appeared on Modern Web Development with Chrome and was authored by Paul Kinlan

<p>One of the other features that my <a href="http://www.kinlan.co.uk/AjaxExperiments/AjaxTag">AJAX</a> application had was Related Searches. This API connected to the <a href="http://developer.yahoo.net">Yahoo API</a> and performed a query. The query is a single search term; the results are searches that a User could perform to get similar results.<p />For instance if you were to put the keyword "Kinlan" into the API, it might bring back searches that would related to "Kinlan", so "Funky Person, Cool Dude and Amazing Geeza" might be some of the searhes that would also relate to the topic of Kinlan.<p />This is quite a handy little thing, because you can link it in with my previous <a href="http://www.kinlan.co.uk/2005/08/proxy-script-to-yahoo-api-term.html">entry </a>to bring back all the related searches to all the keywords are provided.<p />The idea was to allow me to specify some searches that would allow the reader to target related topics and subjects through a search engine such as MSN, Google or Yahoo<p />Anyway, here is the code.<p /><div class="CodeRay"></p> <div class="code"><pre>#!/usr/bin/perluse LWP;use CGI qw(:standard);$CGI::POST_MAX=1024 * 100; # max 100K postsmy($qCGI) = new CGI();my($YahooAppID) = 'APPIDHERE';my($baseUrl) = 'http://api.search.yahoo.com/WebSearchService/V1/relatedSuggestion';my($query) = $qCGI->param('query');my($finalUrl) = $baseUrl$ua = LWP::UserAgent->new;$ua->agent('YahooPassThrough/0.1 ');# Create a requestmy $req = HTTP::Request->new(POST => $finalUrl);$req->content('appid=$YahooAppID&query=$query&results=50');# Pass request to the user agent and get a response backmy $res = $ua->request($req);print 'Content-type: text/xml\n\n';print $res->content;</pre></div> </div> <p />


This content originally appeared on Modern Web Development with Chrome and was authored by Paul Kinlan


Print Share Comment Cite Upload Translate Updates
APA

Paul Kinlan | Sciencx (2005-08-27T00:00:00+00:00) Proxy Script To Yahoo Related Searches. Retrieved from https://www.scien.cx/2005/08/27/proxy-script-to-yahoo-related-searches/

MLA
" » Proxy Script To Yahoo Related Searches." Paul Kinlan | Sciencx - Saturday August 27, 2005, https://www.scien.cx/2005/08/27/proxy-script-to-yahoo-related-searches/
HARVARD
Paul Kinlan | Sciencx Saturday August 27, 2005 » Proxy Script To Yahoo Related Searches., viewed ,<https://www.scien.cx/2005/08/27/proxy-script-to-yahoo-related-searches/>
VANCOUVER
Paul Kinlan | Sciencx - » Proxy Script To Yahoo Related Searches. [Internet]. [Accessed ]. Available from: https://www.scien.cx/2005/08/27/proxy-script-to-yahoo-related-searches/
CHICAGO
" » Proxy Script To Yahoo Related Searches." Paul Kinlan | Sciencx - Accessed . https://www.scien.cx/2005/08/27/proxy-script-to-yahoo-related-searches/
IEEE
" » Proxy Script To Yahoo Related Searches." Paul Kinlan | Sciencx [Online]. Available: https://www.scien.cx/2005/08/27/proxy-script-to-yahoo-related-searches/. [Accessed: ]
rf:citation
» Proxy Script To Yahoo Related Searches | Paul Kinlan | Sciencx | https://www.scien.cx/2005/08/27/proxy-script-to-yahoo-related-searches/ |

Please log in to upload a file.




There are no updates yet.
Click the Upload button above to add an update.

You must be logged in to translate posts. Please log in or register.