|
...
|
...
|
@@ -62,16 +62,31 @@ if (!function_exists('http_post')) { |
|
|
|
);
|
|
|
|
}
|
|
|
|
$ch = curl_init();
|
|
|
|
// curl_setopt($ch, CURLOPT_URL, $url);
|
|
|
|
// curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
|
|
|
// curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
|
|
|
// curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
|
|
|
// curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
|
|
|
|
// curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; MSIE 5.01; Windows NT 5.0)');
|
|
|
|
// curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
|
|
|
|
// curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
|
|
|
|
// curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
|
|
|
|
// curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
|
|
curl_setopt($ch, CURLOPT_URL, $url);
|
|
|
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
|
|
curl_setopt($ch, CURLOPT_HEADER, false);
|
|
|
|
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
|
|
|
|
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36 Edge/12.246');
|
|
|
|
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
|
|
|
|
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 120);
|
|
|
|
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
|
|
|
|
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
|
|
|
|
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
|
|
|
|
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
|
|
|
|
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
|
|
|
|
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; MSIE 5.01; Windows NT 5.0)');
|
|
|
|
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
|
|
|
|
curl_setopt($ch, CURLOPT_AUTOREFERER, 1);
|
|
|
|
curl_setopt($ch, CURLOPT_SSLVERSION, 'all');
|
|
|
|
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
|
|
|
|
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
|
|
|
curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
|
|
|
|
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
|
|
|
|
$res = curl_exec($ch);
|
|
|
|
if (curl_errno($ch)) {
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($url, true) . PHP_EOL, FILE_APPEND);
|
...
|
...
|
|