failed to open stream: HTTP request failed! HTTP/1.0 401 Authorization Required
I use PHP, I want to use OpenID function of yahoo, but when login success, I want get infor user to save into my DB, error above display.
Warning: file_get_contents(http://social.yahooapis.com/v1/user/QOR6BX75RE3BS2AFCPWTB4RNXY/profile) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.0 401 Authorization Required in D:\Document\Web\Php\wamp\www\newblog\controllers\yahoo.php on line 103.
Basestring:
$url_get_infor_user = "http://social.yahooapis.com/v1/user/" . $guid . "/profile";
$base_string = "GET&" . $url_get_infor_user . "&oauth_consumer_key=" . $consumer_key . "&oauth_nonce=" . $oauth_nonce . "&oauth_signature_method=HMAC-SHA1"
. "&oauth_timestamp=" . time() . "&oauth_version=1.0" . "&url=" . urlencode("http://www.yahoo.com");
$signature = base64_encode(hash_hmac('sha1', $base_string, $consumer_secret . "&" . $secret_token, true));
Where am I wrong ??
Please help me