#!/usr/bin/env php . */ define('INSTALLDIR', realpath(dirname(__FILE__) . '/../..')); require_once INSTALLDIR . '/extlib/OAuth.php'; $shortoptions = 't:s:'; $longoptions = array('oauth_token=', 'oauth_token_secret='); $helptext = <<sign_request($hmac_method, $consumer, $atok); $httpReq = httpRequest($oauthReq->to_url()); } catch (Exception $e) { print "Error! HTTP response body: " . $httpReq->getBody(); exit(1); } print $httpReq->getBody(); function httpRequest($url) { $request = HTTPClient::start(); $request->setConfig( array( 'follow_redirects' => true, 'connect_timeout' => 120, 'timeout' => 120, 'ssl_verify_peer' => false, 'ssl_verify_host' => false ) ); return $request->get($url); }