(PECL OAuth >= 0.99.1)
OAuth::fetch — Fetch an OAuth protected resource
$protected_resource_url,$extra_parameters = ?,$http_method = ?,$http_headers = ?Fetch a resource.
protected_resource_urlURL to the OAuth protected resource.
extra_parametersExtra parameters to send with the request for the resource.
http_method
       One of the OAUTH_HTTP_METHOD_*
       OAUTH constants, which includes
       GET, POST, PUT, HEAD, or DELETE.
      
       HEAD (OAUTH_HTTP_METHOD_HEAD) can be useful for
       discovering information prior to the request (if OAuth credentials are
       in the Authorization header).
      
http_headersHTTP client headers (such as User-Agent, Accept, etc.)
| Version | Description | 
|---|---|
| PECL oauth 1.0.0 | Previously returned nullon failure, instead offalse. | 
| PECL oauth 0.99.5 | The http_methodparameter was added | 
| PECL oauth 0.99.8 | The http_headersparameter was added | 
Example #1 OAuth::fetch() example
<?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";
}
?>