|
...
|
...
|
@@ -162,12 +162,19 @@ class FormGlobalsoApi |
|
|
|
* @method :post
|
|
|
|
* @time :2024/8/15 14:16
|
|
|
|
*/
|
|
|
|
public function getInquiryAll($domain){
|
|
|
|
public function getInquiryAll($domain,$is_upgrade = 0){
|
|
|
|
if (!(strpos($domain, 'https://') === 0)) {
|
|
|
|
$domain = 'https://'.$domain.'/';
|
|
|
|
}
|
|
|
|
$token = md5($domain.date("Y-m-d"));
|
|
|
|
$url = "https://form.globalso.com/api/external-interface/domain_con/15243d63ed5a5738?domain=$domain&token=$token&source=1,2,3,4&num=15";
|
|
|
|
$data = [
|
|
|
|
'domain' => $domain,
|
|
|
|
'token' => $token,
|
|
|
|
'source'=> $is_upgrade ? '1,2,3,4' : '1,3',
|
|
|
|
'num'=>15,
|
|
|
|
];
|
|
|
|
$queryString = http_build_query($data);
|
|
|
|
$url = "https://form.globalso.com/api/external-interface/domain_con/15243d63ed5a5738?".$queryString;
|
|
|
|
try {
|
|
|
|
$res = http_get($url,['charset=utf-8']);
|
|
|
|
} catch (\Exception | GuzzleException $e) {
|
|
...
|
...
|
@@ -184,10 +191,18 @@ class FormGlobalsoApi |
|
|
|
* @method :post
|
|
|
|
* @time :2024/8/16 10:16
|
|
|
|
*/
|
|
|
|
public function getMonthInquiry($url,$month){
|
|
|
|
public function getMonthInquiry($url,$month,$is_upgrade = 0){
|
|
|
|
$url = 'https://'.$url.'/';
|
|
|
|
$token = md5($url.date("Y-m-d"));
|
|
|
|
$url = 'https://form.globalso.com/api/external-interface/country_con/15243d63ed5a5738?domain='.$url.'&token='.$token.'&source=1,2,3,4&model=month&sta_date='.$month;
|
|
|
|
$data = [
|
|
|
|
'domain' => $url,
|
|
|
|
'token' => $token,
|
|
|
|
'source'=> $is_upgrade ? '1,2,3,4' : '1,3',
|
|
|
|
'model' => 'month',
|
|
|
|
'sta_date'=>$month,
|
|
|
|
];
|
|
|
|
$queryString = http_build_query($data);
|
|
|
|
$url = 'https://form.globalso.com/api/external-interface/country_con/15243d63ed5a5738?'.$queryString;
|
|
|
|
$res = http_get($url,['charset=utf-8']);
|
|
|
|
echo date('Y-m-d H:i:s') . '数据:'.json_encode($res) . PHP_EOL;
|
|
|
|
return $res;
|
...
|
...
|
|