X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fsnapshot.php;h=2a10c6b9359d503dce7c7829f8d5aeff2c4b2f10;hb=d59df6b27013fb534d6444d8e4790f2edcd9459a;hp=ede846e5b02e852e5473a336af04160d410188f9;hpb=bbb830e14c718c687f0636710a1827c90b11f4cc;p=quix0rs-gnu-social.git diff --git a/lib/snapshot.php b/lib/snapshot.php index ede846e5b0..2a10c6b935 100644 --- a/lib/snapshot.php +++ b/lib/snapshot.php @@ -172,26 +172,9 @@ 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 = HTTPClient::start(); + $request->post($reporturl, null, $this->stats); } /**