Поправил типы

This commit is contained in:
CORP\phedor 2018-02-16 12:11:52 +03:00
parent dd757b3c1e
commit 8f5d029868
2 changed files with 5 additions and 11 deletions

View file

@ -99,18 +99,9 @@ class Connection_HttpRequest
static function getJSON($url, $data) {
$query = http_build_query($data);
$q = $url . '?' . $query;
/*$c = new Connection_HttpRequest();
$c->http_version = "HTTP/1.0";
$c->setUrl($q);
$page = $c->getPage();
$response = new Connection_HttpResponse($page);
$data = $response->getData();
*/
$data = file_get_contents($q);
return json_decode((string) preg_replace('/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F]/', '', $data), true);
$content = File::getContents($q);
return json_decode((string) preg_replace('/[\x00-\x09\x0B\x0C\x0E-\x1F\x7F]/', '', $content), true);
}
}