ctinyle 3 months ago
parent
commit
97631f43b1
1 changed files with 1 additions and 2 deletions
  1. 1 2
      app/Http/Controllers/SourceController.php

+ 1 - 2
app/Http/Controllers/SourceController.php

@@ -21,7 +21,6 @@ class SourceController extends BaseController
21
             'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36',
21
             'User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36',
22
             'v' => 231012
22
             'v' => 231012
23
         ];
23
         ];
24
-        echo 22222222222;
25
 //        $params = [
24
 //        $params = [
26
 //            'complexname' => '成都翔威建筑工程有限公司',
25
 //            'complexname' => '成都翔威建筑工程有限公司',
27
 //            'pg' => 0,
26
 //            'pg' => 0,
@@ -30,7 +29,7 @@ class SourceController extends BaseController
30
 //        ];
29
 //        ];
31
         try {
30
         try {
32
             $res = $client->request('GET', $url, [
31
             $res = $client->request('GET', $url, [
33
-                'header' => $header
32
+                'headers' => ['User-Agent' => 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36'],
34
             ]);
33
             ]);
35
         } catch (\Exception $e) {
34
         } catch (\Exception $e) {
36
             dd($e);
35
             dd($e);