The code in ysuggest_proxy.php file which TreeView is using has curl
functions. I like to have the code more generic as all servers do not
have curl installed as default.
I have never used curl, can someone convert it so code works without curl?
______ PAGE CODE BELOW ______________________________________
/* yadl_spaceid - Skip Stamping */
// Yahoo! Search proxy
// Hard-code hostname and path:
define ('PATH',
'http://localhost/fotonapakymppi/kymppi_cart_d1/admin/yahoo_treeview_categories_\
data.php?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);