|
|
@ -1435,7 +1435,7 @@ class Api { |
|
|
|
#GET HTTPS |
|
|
|
#GET HTTPS |
|
|
|
$curl = curl_init($api_url); |
|
|
|
$curl = curl_init($api_url); |
|
|
|
#设置useragent |
|
|
|
#设置useragent |
|
|
|
#curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"); |
|
|
|
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36"); |
|
|
|
curl_setopt($curl, CURLOPT_FAILONERROR, true); |
|
|
|
curl_setopt($curl, CURLOPT_FAILONERROR, true); |
|
|
|
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); |
|
|
|
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); |
|
|
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); |
|
|
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); |
|
|
@ -1486,7 +1486,7 @@ class Api { |
|
|
|
#GET HTTPS |
|
|
|
#GET HTTPS |
|
|
|
$curl = curl_init($api_url); |
|
|
|
$curl = curl_init($api_url); |
|
|
|
#设置useragent |
|
|
|
#设置useragent |
|
|
|
#curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"); |
|
|
|
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36"); |
|
|
|
curl_setopt($curl, CURLOPT_FAILONERROR, true); |
|
|
|
curl_setopt($curl, CURLOPT_FAILONERROR, true); |
|
|
|
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); |
|
|
|
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); |
|
|
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); |
|
|
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); |
|
|
@ -1536,7 +1536,7 @@ class Api { |
|
|
|
//检查本地是否存在更新程序 |
|
|
|
//检查本地是否存在更新程序 |
|
|
|
$curl = curl_init($url); |
|
|
|
$curl = curl_init($url); |
|
|
|
#设置useragent |
|
|
|
#设置useragent |
|
|
|
#curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (compatible; Baiduspider/2.0; +http://www.baidu.com/search/spider.html)"); |
|
|
|
curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/102.0.5005.63 Safari/537.36"); |
|
|
|
curl_setopt($curl, CURLOPT_FAILONERROR, true); |
|
|
|
curl_setopt($curl, CURLOPT_FAILONERROR, true); |
|
|
|
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); |
|
|
|
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true); |
|
|
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); |
|
|
|
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); |
|
|
|