|
...
|
...
|
@@ -55,21 +55,21 @@ class QuanqiusouApi |
|
|
|
* @date 2023/5/11
|
|
|
|
*/
|
|
|
|
public function getSiteResPer($api_no){
|
|
|
|
$key = 'quanqiusou_api_site_res_per_' . $api_no . '_' . date('Y-m-d');
|
|
|
|
$res = Cache::get($key);
|
|
|
|
if (!$res) {
|
|
|
|
// $key = 'quanqiusou_api_site_res_per_' . $api_no . '_' . date('Y-m-d');
|
|
|
|
// $res = Cache::get($key);
|
|
|
|
// if (!$res) {
|
|
|
|
$api_url = $this->url . '/google-rank/echo_site_res_per.php';
|
|
|
|
try {
|
|
|
|
$res = HttpUtils::get($api_url, ['apino' => $api_no]);
|
|
|
|
if($res){
|
|
|
|
$res = Arr::s2a($res);
|
|
|
|
Cache::put($key, $res, 2 * 3600);
|
|
|
|
// Cache::put($key, $res, 2 * 3600);
|
|
|
|
}
|
|
|
|
} catch (\Exception | GuzzleException $e) {
|
|
|
|
errorLog('获取站点收录页面数', [], $e);
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// }
|
|
|
|
return $res;
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|