|
@ -7,6 +7,7 @@ class HTTP { |
|
|
$ch = curl_init($url); |
|
|
$ch = curl_init($url); |
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
|
|
curl_setopt($ch, CURLOPT_HEADER, true); |
|
|
curl_setopt($ch, CURLOPT_HEADER, true); |
|
|
|
|
|
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); |
|
|
$response = curl_exec($ch); |
|
|
$response = curl_exec($ch); |
|
|
$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE); |
|
|
$header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE); |
|
|
return array( |
|
|
return array( |
|
@ -22,6 +23,7 @@ class HTTP { |
|
|
curl_setopt($ch, CURLOPT_POST, true); |
|
|
curl_setopt($ch, CURLOPT_POST, true); |
|
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $body); |
|
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $body); |
|
|
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); |
|
|
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); |
|
|
|
|
|
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); |
|
|
curl_setopt($ch, CURLOPT_HEADER, true); |
|
|
curl_setopt($ch, CURLOPT_HEADER, true); |
|
|
if (self::$_proxy) curl_setopt($ch, CURLOPT_PROXY, self::$_proxy); |
|
|
if (self::$_proxy) curl_setopt($ch, CURLOPT_PROXY, self::$_proxy); |
|
|
$response = curl_exec($ch); |
|
|
$response = curl_exec($ch); |
|
@ -39,6 +41,7 @@ class HTTP { |
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); |
|
|
curl_setopt($ch, CURLOPT_HEADER, true); |
|
|
curl_setopt($ch, CURLOPT_HEADER, true); |
|
|
curl_setopt($ch, CURLOPT_NOBODY, true); |
|
|
curl_setopt($ch, CURLOPT_NOBODY, true); |
|
|
|
|
|
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); |
|
|
if (self::$_proxy) curl_setopt($ch, CURLOPT_PROXY, self::$_proxy); |
|
|
if (self::$_proxy) curl_setopt($ch, CURLOPT_PROXY, self::$_proxy); |
|
|
$response = curl_exec($ch); |
|
|
$response = curl_exec($ch); |
|
|
return array( |
|
|
return array( |
|
|