|
...
|
...
|
@@ -45,6 +45,20 @@ class RapIdApIService |
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @remark :备用数据
|
|
|
|
* @name :keywordResearch
|
|
|
|
* @author :lyh
|
|
|
|
* @method :post
|
|
|
|
* @time :2025/4/10 10:23
|
|
|
|
*/
|
|
|
|
public function keywordResearch($keyword){
|
|
|
|
$this->url = 'https://seo-keyword-research.p.rapidapi.com/keynew.php';
|
|
|
|
$param = ["keyword" => $keyword, 'country' => 'us'];
|
|
|
|
$query_string = str_replace('+', '%20', http_build_query($param));
|
|
|
|
$url = $this->url.'/?'.$query_string;
|
|
|
|
return $this->curlGoogleApi($url);
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
* @remark :请求
|
|
|
|
* @name :curlGoogleApi
|
|
|
|
* @author :lyh
|
|
...
|
...
|
@@ -72,7 +86,6 @@ class RapIdApIService |
|
|
|
if ($err) {
|
|
|
|
return false;
|
|
|
|
} else {
|
|
|
|
@file_put_contents(storage_path('logs/lyh_error.log'), var_export($response, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
return json_decode($response,true);
|
|
|
|
}
|
|
|
|
}
|
...
|
...
|
|