正在显示
1 个修改的文件
包含
8 行增加
和
6 行删除
| @@ -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 | } |
-
请 注册 或 登录 后发表评论