0

oauth yahoo boss problem (blank page)

Hello guys,

I have a searchengine wich based on the yahoo boss api. The yahoo boss api is intigrated with oauth. on my last server it works, but i copied my data to my new server but it doesn't works. It came a blank page. this is my connection with oauth.:

    require("OAuth.php"); 
    switch($type)
    {
        case "search":
        $url = "<http://yboss.yahooapis.com/ysearch/limitedweb>";  
        $count = 10;
        break;

        case "image":
        $url = "<http://yboss.yahooapis.com/ysearch/images>"; 
        $count = 35;
        break;

        case "news":
        $url = "<http://yboss.yahooapis.com/ysearch/news>"; 
        $count = 10;
        break;
    }   
    $cc_key  = "placeholder";  
    $cc_secret = "placeholder";  
    $args = array();  
    $args["q"] = $q;  
    $args["count"] = $count;
    $args["format"] = "json";  
    $args["start"] = $page;
    $args["market"] = $lang;

    $consumer = new OAuthConsumer($cc_key, $cc_secret);  
    $request = OAuthRequest::from_consumer_and_token($consumer, NULL,"GET", $url, $args);  
    $request->sign_request(new OAuthSignatureMethod_HMAC_SHA1(), $consumer, NULL);  
    $url = sprintf("%s?%s", $url, OAuthUtil::build_http_query($args));  
    $ch = curl_init();  
    $headers = array($request->to_header());  
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);  
    curl_setopt($ch, CURLOPT_URL, $url);  
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);  
    $rsp = curl_exec($ch);
    $results = json_decode($rsp, true); 

that's my OAuth.php code:

oauth code

and here is some php/apache2 server configuration information:

my server configuration

can anybody help me ?

by
0 Replies

Recent Posts

in OAuth General Discussion YDN SDKs