|
...
|
...
|
@@ -33,7 +33,13 @@ class RapIdApIService |
|
|
|
*/
|
|
|
|
public function requestUrl($keyword){
|
|
|
|
$this->url = 'https://google-keyword-insight1.p.rapidapi.com/globalkey';
|
|
|
|
$url = $this->url.'/?keyword='.$keyword.'&lang=en';
|
|
|
|
$param = [
|
|
|
|
'keyword'=>$keyword,
|
|
|
|
'location'=>'US',
|
|
|
|
'lang'=>'en'
|
|
|
|
];
|
|
|
|
$query_string = str_replace('+', '%20', http_build_query($param));
|
|
|
|
$url = $this->url.'/?'.$query_string;
|
|
|
|
$data = $this->curlGoogleApi($url);
|
|
|
|
return $data;
|
|
|
|
}
|
|
...
|
...
|
@@ -47,13 +53,7 @@ class RapIdApIService |
|
|
|
*/
|
|
|
|
public function requestKeywordUrl($keyword){
|
|
|
|
$this->url = 'https://google-keyword-insight1.p.rapidapi.com/topkeys';
|
|
|
|
$param = [
|
|
|
|
'keyword'=>$keyword,
|
|
|
|
'location'=>'US',
|
|
|
|
'lang'=>'en'
|
|
|
|
];
|
|
|
|
$query_string = http_build_query($param);
|
|
|
|
$url = $this->url.'/?'.$query_string;
|
|
|
|
$url = $this->url.'/?keyword='.$keyword.'&location=US&&lang=en';
|
|
|
|
return $this->curlGoogleApi($url);
|
|
|
|
}
|
|
|
|
|
...
|
...
|
|