作者 lyh

GXgeo设置

@@ -50,19 +50,21 @@ class GeoService @@ -50,19 +50,21 @@ class GeoService
50 * @param int $lum_json 默认1 不只是什么参数 50 * @param int $lum_json 默认1 不只是什么参数
51 * @return mixed|string 51 * @return mixed|string
52 */ 52 */
53 - public function getGooglePlatformResult($search, $lum_json = 1) 53 + public function getGooglePlatformResult($search)
54 { 54 {
55 - $url = 'http://43.153.56.18:58000/google_ai_summary'; 55 + $url = 'https://api.cmer.com/ai-overviews';
56 $header = [ 56 $header = [
57 'accept: application/json', 57 'accept: application/json',
58 - 'x-api-key: 6EipgPsy3Q7Q9M2jCx',  
59 - 'Content-Type: application/json' 58 + 'apikey: UkzZljFv83Z2qBi5YR1o3f2otAVWtug6',
  59 + 'Content-Type: application/json',
  60 + 'X-CmerApi-Host:ai-overviews.p.cmer.com'
60 ]; 61 ];
61 $param = [ 62 $param = [
62 'q' => $search, 63 'q' => $search,
63 - 'lum_json' => $lum_json 64 + 'location' => 'New York, United States',
  65 + 'gl' => 'us',
  66 + 'hl'=>'en'
64 ]; 67 ];
65 -  
66 $url = $url . '?' . http_build_query($param); 68 $url = $url . '?' . http_build_query($param);
67 return http_get($url, $header); 69 return http_get($url, $header);
68 } 70 }