Search the web
Sign In
New User? Sign Up
ydn-php · Yahoo! PHP Developer Group (CLOSED)
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Show off your group to the world. Share a photo of your group with us.

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
yahoo contact book api   Message List  
Reply | Forward Message #256 of 335 |
Good day,


I'm trying to use this API in a part of a system. Right now I'm only
using the SearchContacts method, the problem is that when I make the
HTTP request to the service it gives a 403 error: Forbidden.
This is the code I'm using to access the service:

$context_options=array();
$data = array("format" => "xml",
"fields" => "all",
"appid" => APPID,
"WSSID" => $this->wssid);
if(is_null($headers))
{
$context_options = array (
'http' => array (
'method' => 'GET' )
);
}else{
$context_options = array (
'http' => array (
'method' => 'GET',
'header'=> "$headers",
)
);
}
$context = stream_context_create($context_options);
if(is_null($data))
{
$fp = fopen($url, 'r', false, $context);
}
else
{
$data = http_build_query($data);
$fp = fopen($url."?".$data, 'r', false, $context);
}
$test="";
while (!feof($fp)) {
$test .= fread($fp, 8192);
}
return $test;

I hope you could throw some light to my problem. Thanks.





Tue Jun 10, 2008 2:59 pm

caedo27
Offline Offline
Send Email Send Email

Forward
Message #256 of 335 |
Expand Messages Author Sort by Date

Good day, I'm trying to use this API in a part of a system. Right now I'm only using the SearchContacts method, the problem is that when I make the HTTP...
caedo27
Offline Send Email
Jun 16, 2008
12:54 am
Advanced

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