webgui/www/extras/yui/examples/treeview/assets/ysuggest_proxy.php
Chris Nehren 8fdd413d12 * resizable text areas now use the YUI 2.5.0 code
* add the new YUI release
* document the change in both the changelog and gotcha.txt
2008-02-26 21:27:14 +00:00

25 lines
647 B
PHP

<?php
/* yadl_spaceid - Skip Stamping */
// Yahoo! Search proxy
// Hard-code hostname and path:
define ('PATH', 'http://search.yahooapis.com/WebSearchService/V1/relatedSuggestion?appid=YahooDemo&output=json&query=');
$type = "application/json";
$query = urlencode($_GET["query"]);
$url = PATH.$query;
// Open the Curl session
$session = curl_init($url);
// Don't return HTTP headers. Do return the contents of the call
curl_setopt($session, CURLOPT_HEADER, false);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
// Make the call
$response = curl_exec($session);
header("Content-Type: ".$type);
echo $response;
curl_close($session);
?>