X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=lib%2Fhttpclient.php;h=bc513e71d03359b893a95b75cb044b98ab332a7e;hb=b7edac26106833382c65d90570a2eea7def5faab;hp=865fc9029e847134b0668fc3ba9eee7b8eab33aa;hpb=a39f51c0441b22951412b2c00d88c34f39cb39c9;p=quix0rs-gnu-social.git diff --git a/lib/httpclient.php b/lib/httpclient.php index 865fc9029e..bc513e71d0 100644 --- a/lib/httpclient.php +++ b/lib/httpclient.php @@ -177,8 +177,17 @@ class HTTPClient extends HTTP_Request2 /** * Quick static function to GET a URL */ - public static function quickGet($url, $accept=null) + public static function quickGet($url, $accept=null, $params=array()) { + if (!empty($params)) { + $params = http_build_query($params, null, '&'); + if (strpos($url, '?') === false) { + $url .= '?' . $params; + } else { + $url .= '&' . $params; + } + } + $client = new HTTPClient(); if (!is_null($accept)) { $client->setHeader('Accept', $accept);