diff options
author | Sarven Capadisli <csarven@status.net> | 2009-11-02 14:53:31 +0000 |
---|---|---|
committer | Sarven Capadisli <csarven@status.net> | 2009-11-02 14:53:31 +0000 |
commit | 8a07c7d7c021693271d1856f15dfe0abd9461d5d (patch) | |
tree | 1846465919fd94a2056c0154782d687242285fd6 /lib/snapshot.php | |
parent | ebd604cf6b6fda6823437cafc1d2db3eb23d9f41 (diff) | |
parent | fa37967858c3c29000797e510e5f98aca8ab558f (diff) |
Merge branch '0.9.x' of git@gitorious.org:statusnet/mainline into 0.9.x
Diffstat (limited to 'lib/snapshot.php')
-rw-r--r-- | lib/snapshot.php | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/lib/snapshot.php b/lib/snapshot.php index ede846e5b..6829e8a75 100644 --- a/lib/snapshot.php +++ b/lib/snapshot.php @@ -172,26 +172,11 @@ class Snapshot { // XXX: Use OICU2 and OAuth to make authorized requests - $postdata = http_build_query($this->stats); - - $opts = - array('http' => - array( - 'method' => 'POST', - 'header' => 'Content-type: '. - 'application/x-www-form-urlencoded', - 'content' => $postdata, - 'user_agent' => 'StatusNet/'.STATUSNET_VERSION - ) - ); - - $context = stream_context_create($opts); - $reporturl = common_config('snapshot', 'reporturl'); - $result = @file_get_contents($reporturl, false, $context); - - return $result; + $request = new HTTPClient($reporturl, HTTP_Request2::METHOD_POST); + $request->addPostParameter($this->stats); + $request->send(); } /** |