From 626f3066002c707e11befcbba84aa7f3b372fd0c Mon Sep 17 00:00:00 2001 From: Zach Copley Date: Thu, 7 Oct 2010 19:41:05 -0700 Subject: Rename OAuth status update script --- tests/oauth/oauth_post_notice.php | 124 ++++++++++++++++++++++++++++++++++++++ tests/oauth/statusupdate.php | 124 -------------------------------------- 2 files changed, 124 insertions(+), 124 deletions(-) create mode 100644 tests/oauth/oauth_post_notice.php delete mode 100644 tests/oauth/statusupdate.php diff --git a/tests/oauth/oauth_post_notice.php b/tests/oauth/oauth_post_notice.php new file mode 100644 index 000000000..5e9d2a7ab --- /dev/null +++ b/tests/oauth/oauth_post_notice.php @@ -0,0 +1,124 @@ +#!/usr/bin/env php +. + **/ + +define('INSTALLDIR', realpath(dirname(__FILE__) . '/../..')); + +require_once INSTALLDIR . '/extlib/OAuth.php'; + +$shortoptions = 't:s:u:'; +$longoptions = array('oauth_token=', 'token_secret=', 'update='); + +$helptext = <<sign_request($hmac_method, $consumer, $atok); + + $httpReq = httpRequest($endpoint, $oauthReq->to_postdata()); + + print $httpReq->getBody(); + +} catch (Exception $e) { + print "Error! . $e->getMessage() . 'HTTP reponse body: " . $httpReq->getBody(); + exit(1); +} + +function httpRequest($endpoint, $poststr) +{ + $request = HTTPClient::start(); + + $request->setConfig( + array( + 'follow_redirects' => true, + 'connect_timeout' => 120, + 'timeout' => 120, + 'ssl_verify_peer' => false, + 'ssl_verify_host' => false + ) + ); + + // Turn signed request query string back into an array + parse_str($poststr, $postdata); + return $request->post($endpoint, null, $postdata); +} + diff --git a/tests/oauth/statusupdate.php b/tests/oauth/statusupdate.php deleted file mode 100644 index 5e9d2a7ab..000000000 --- a/tests/oauth/statusupdate.php +++ /dev/null @@ -1,124 +0,0 @@ -#!/usr/bin/env php -. - **/ - -define('INSTALLDIR', realpath(dirname(__FILE__) . '/../..')); - -require_once INSTALLDIR . '/extlib/OAuth.php'; - -$shortoptions = 't:s:u:'; -$longoptions = array('oauth_token=', 'token_secret=', 'update='); - -$helptext = <<sign_request($hmac_method, $consumer, $atok); - - $httpReq = httpRequest($endpoint, $oauthReq->to_postdata()); - - print $httpReq->getBody(); - -} catch (Exception $e) { - print "Error! . $e->getMessage() . 'HTTP reponse body: " . $httpReq->getBody(); - exit(1); -} - -function httpRequest($endpoint, $poststr) -{ - $request = HTTPClient::start(); - - $request->setConfig( - array( - 'follow_redirects' => true, - 'connect_timeout' => 120, - 'timeout' => 120, - 'ssl_verify_peer' => false, - 'ssl_verify_host' => false - ) - ); - - // Turn signed request query string back into an array - parse_str($poststr, $postdata); - return $request->post($endpoint, null, $postdata); -} - -- cgit v1.2.3-54-g00ecf