|
...
|
...
|
@@ -100,12 +100,17 @@ if (!function_exists('http_get')) { |
|
|
|
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
|
|
|
|
curl_setopt($ch1, CURLOPT_ENCODING, '');
|
|
|
|
curl_setopt($ch1, CURLOPT_MAXREDIRS, 10);
|
|
|
|
curl_setopt($ch1, CURLOPT_TIMEOUT, 120);
|
|
|
|
curl_setopt($ch1, CURLOPT_HTTPHEADER, $header);
|
|
|
|
curl_setopt($ch1, CURLOPT_CONNECTTIMEOUT, $timeout);
|
|
|
|
curl_setopt($ch1, CURLOPT_FOLLOWLOCATION, true);
|
|
|
|
curl_setopt($ch1, CURLOPT_CUSTOMREQUEST, 'GET');
|
|
|
|
curl_setopt($ch1, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
|
|
|
|
$access_txt = curl_exec($ch1);
|
|
|
|
if (curl_errno($ch1)) {
|
|
|
|
$error_message = curl_error($ch1);
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($error_message, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
}
|
|
|
|
curl_close($ch1);
|
|
|
|
return json_decode($access_txt, true);
|
|
|
|
}
|
...
|
...
|
|