|
@@ -45,6 +45,20 @@ class RapIdApIService |
|
@@ -45,6 +45,20 @@ class RapIdApIService |
|
45
|
}
|
45
|
}
|
|
46
|
|
46
|
|
|
47
|
/**
|
47
|
/**
|
|
|
|
48
|
+ * @remark :备用数据
|
|
|
|
49
|
+ * @name :keywordResearch
|
|
|
|
50
|
+ * @author :lyh
|
|
|
|
51
|
+ * @method :post
|
|
|
|
52
|
+ * @time :2025/4/10 10:23
|
|
|
|
53
|
+ */
|
|
|
|
54
|
+ public function keywordResearch($keyword){
|
|
|
|
55
|
+ $this->url = 'https://seo-keyword-research.p.rapidapi.com/keynew.php';
|
|
|
|
56
|
+ $param = ["keyword" => $keyword, 'country' => 'us'];
|
|
|
|
57
|
+ $query_string = str_replace('+', '%20', http_build_query($param));
|
|
|
|
58
|
+ $url = $this->url.'/?'.$query_string;
|
|
|
|
59
|
+ return $this->curlGoogleApi($url);
|
|
|
|
60
|
+ }
|
|
|
|
61
|
+ /**
|
|
48
|
* @remark :请求
|
62
|
* @remark :请求
|
|
49
|
* @name :curlGoogleApi
|
63
|
* @name :curlGoogleApi
|
|
50
|
* @author :lyh
|
64
|
* @author :lyh
|
|
@@ -72,7 +86,6 @@ class RapIdApIService |
|
@@ -72,7 +86,6 @@ class RapIdApIService |
|
72
|
if ($err) {
|
86
|
if ($err) {
|
|
73
|
return false;
|
87
|
return false;
|
|
74
|
} else {
|
88
|
} else {
|
|
75
|
- @file_put_contents(storage_path('logs/lyh_error.log'), var_export($response, true) . PHP_EOL, FILE_APPEND);
|
|
|
|
76
|
return json_decode($response,true);
|
89
|
return json_decode($response,true);
|
|
77
|
}
|
90
|
}
|
|
78
|
}
|
91
|
}
|