|
@@ -9,7 +9,7 @@
|
|
|
|
|
|
defined('InShopNC') or exit('Access Invalid!');
|
|
|
|
|
|
-function http_request($url, $params = array(), $method = 'GET', $multi = false, $extheaders = array())
|
|
|
+function http_request($url, $params = array(), $method = 'GET', $multi = false, $extheaders = array(),&$net_errno = 0)
|
|
|
{
|
|
|
if (!function_exists('curl_init')) {
|
|
|
return false;
|
|
@@ -63,8 +63,8 @@ function http_request($url, $params = array(), $method = 'GET', $multi = false,
|
|
|
$response = curl_exec($ci);
|
|
|
if($response === false) {
|
|
|
$err = curl_error($ci);
|
|
|
- $no = curl_errno($ci);
|
|
|
- Log::record("netmodule http_request errno={$no} err={$err}",Log::ERR);
|
|
|
+ $net_errno = curl_errno($ci);
|
|
|
+ Log::record("netmodule http_request errno={$net_errno} err={$err}",Log::ERR);
|
|
|
}
|
|
|
|
|
|
curl_close($ci);
|
|
@@ -72,7 +72,7 @@ function http_request($url, $params = array(), $method = 'GET', $multi = false,
|
|
|
return $response;
|
|
|
}
|
|
|
|
|
|
-function http_post_data($url, $body, $headers = array())
|
|
|
+function http_post_data($url, $body, $headers = array(),&$net_errno = 0)
|
|
|
{
|
|
|
if (!function_exists('curl_init')) {
|
|
|
return false;
|
|
@@ -96,15 +96,15 @@ function http_post_data($url, $body, $headers = array())
|
|
|
$response = curl_exec($ci);
|
|
|
if($response === false) {
|
|
|
$err = curl_error($ci);
|
|
|
- $no = curl_errno($ci);
|
|
|
- Log::record("netmodule http_post_data errno={$no} err={$err}",Log::ERR);
|
|
|
+ $net_errno = curl_errno($ci);
|
|
|
+ Log::record("netmodule http_post_data errno={$net_errno} err={$err}",Log::ERR);
|
|
|
}
|
|
|
curl_close($ci);
|
|
|
|
|
|
return $response;
|
|
|
}
|
|
|
|
|
|
-function https_request($url, $params = array(), $method = 'GET', $multi = false, $extheaders = array())
|
|
|
+function https_request($url, $params = array(), $method = 'GET', $multi = false, $extheaders = array(),&$net_errno = 0)
|
|
|
{
|
|
|
if (!function_exists('curl_init')) {
|
|
|
return false;
|
|
@@ -156,8 +156,8 @@ function https_request($url, $params = array(), $method = 'GET', $multi = false,
|
|
|
$response = curl_exec($ci);
|
|
|
if($response === false) {
|
|
|
$err = curl_error($ci);
|
|
|
- $no = curl_errno($ci);
|
|
|
- Log::record("netmodule https_request errno={$no} err={$err}",Log::ERR);
|
|
|
+ $net_errno = curl_errno($ci);
|
|
|
+ Log::record("netmodule https_request errno={$net_errno} err={$err}",Log::ERR);
|
|
|
}
|
|
|
curl_close($ci);
|
|
|
|