|
@@ -24,6 +24,7 @@ function http_request($url, $params = array(), $method = 'GET', $multi = false,
|
|
|
curl_setopt($ci, CURLOPT_HEADER, false);
|
|
|
curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, 60);
|
|
|
curl_setopt($ci, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4);
|
|
|
+ curl_setopt($ci, CURLOPT_FOLLOWLOCATION, true);
|
|
|
|
|
|
$headers = (array) $extheaders;
|
|
|
switch ($method)
|
|
@@ -97,6 +98,7 @@ function http_post_data($url, $body, $headers = array(),&$net_errno = 0)
|
|
|
curl_setopt($ci, CURLOPT_URL, $url);
|
|
|
curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, 60);
|
|
|
curl_setopt($ci, CURLOPT_POST, TRUE);
|
|
|
+ curl_setopt($ci, CURLOPT_FOLLOWLOCATION, true);
|
|
|
|
|
|
if (!empty($headers)) {
|
|
|
curl_setopt($ci, CURLOPT_HTTPHEADER, $headers);
|
|
@@ -134,6 +136,8 @@ function https_request($url, $params = array(), $method = 'GET', $multi = false,
|
|
|
curl_setopt($ci, CURLOPT_SSL_VERIFYHOST, 2);
|
|
|
curl_setopt($ci, CURLOPT_CONNECTTIMEOUT, 60);
|
|
|
curl_setopt($ci, CURLOPT_HEADER, false);
|
|
|
+ curl_setopt($ci, CURLOPT_FOLLOWLOCATION, true);
|
|
|
+
|
|
|
$headers = (array) $extheaders;
|
|
|
switch ($method)
|
|
|
{
|