(PECL OAuth >= 0.99.1)
OAuth::fetch — OAuth で保護されたリソースを取得する
OAuth で保護されたリソースを取得します。
OAuth で保護されたリソースへの URL。
リソースへのリクエストとともに送信する追加パラメータ。
成功した場合に TRUE を、失敗した場合に FALSE を返します。
例1 OAuth::fetch() の例
<?php
try {
    $oauth = new OAuth("consumer_key","consumer_secret",OAUTH_SIG_METHOD_HMACSHA1,OAUTH_AUTH_TYPE_AUTHORIZATION);
    $oauth->setToken("access_token","access_token_secret");
    $oauth->fetch("http://photos.example.net/photo?file=vacation.jpg");
    $response_info = $oauth->getLastResponseInfo();
    header("Content-Type: {$response_info["content_type"]}");
    echo $oauth->getLastResponse();
} catch(OAuthException $E) {
    echo "Exception caught!\n";
    echo "Response: ". $E->lastResponse . "\n";
}
?>