Search the web
Sign In
New User? Sign Up
ydn-javascript · Yahoo! User Interface Library Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Is Treeview ysuggest_proxy.php curl code converstion possible?   Message List  
Reply | Forward Message #33894 of 52114 |
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);





Sun Jul 6, 2008 8:44 pm

riku.tuominen
Offline Offline
Send Email Send Email

Forward
Message #33894 of 52114 |
Expand Messages Author Sort by Date

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...
riku.tuominen
Offline Send Email
Jul 6, 2008
8:44 pm

PHP has probably the best online documentation of any language out there. Not only is it extremely user-friendly but the comments are typically very useful: ...
Matt Hackett
richtaur
Online Now Send Email
Jul 7, 2008
4:52 am

Thank you for you reply. My need it to make general code which is used in many different servers. That is why I want to have the code without curl. I realised...
riku.tuominen
Offline Send Email
Jul 7, 2008
7:57 am

YUI's new Get utility lets you circumvent the browser limitation on cross-domain sources. That would allow you to access data from servers other than the one...
Satyam
satyamutsa
Offline Send Email
Jul 7, 2008
8:18 am

Yes I realised that was for that cross-domain. I dont need that proxy cause all is done in same domain. I removed the proxy but having still some problems. ...
riku.tuominen
Offline Send Email
Jul 7, 2008
8:26 am
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help