private static function GetTokenFromUrl($url) {
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    $response = curl_exec($ch);
    $headers = curl_getinfo($ch);
    curl_close($ch);

    if ($headers['http_code'] != 200) {
      throw new OAuthException($response);
    }

    return self::GetTokenFromQueryString($response);
  }
private static function GetTokenFromUrl($url) {
    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_HEADER, 0);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
    $response = curl_exec($ch);
    $headers = curl_getinfo($ch);
    curl_close($ch);

    if ($headers['http_code'] != 200) {
      throw new OAuthException($response);
    }

    return self::GetTokenFromQueryString($response);
  }
private static function GetTokenFromUrl ( $ url ) { $ ch = curl_init ( $ url ) ; curl_setopt ( $ ch , CURLOPT_FOLLOWLOCATION , 1 ) ; curl_setopt ( $ ch , CURLOPT_HEADER , 0 ) ; curl_setopt ( $ ch , CURLOPT_RETURNTRANSFER , 1 ) ; curl_setopt ( $ ch , CURLOPT_SSL_VERIFYPEER , 0 ) ; $ response = curl_exec ( $ ch ) ; $ headers = curl_getinfo ( $ ch ) ; curl_close ( $ ch ) ; if ( $ headers [ 'http_code' ] != 200 ) { throw new OAuthException ( $ response ) ; } return self :: GetTokenFromQueryString ( $ response ) ; }
Makes an HTTP request to the given URL and extracts the returned OAuth
token.
@param string $url the URL to make the request to
@return OAuthToken the returned token
Makes an HTTP request to the given URL and extracts the returned OAuth token .