正在显示
1 个修改的文件
包含
2 行增加
和
23 行删除
| @@ -36,7 +36,7 @@ class CountAllProject extends Command | @@ -36,7 +36,7 @@ class CountAllProject extends Command | ||
| 36 | public function handle(){ | 36 | public function handle(){ |
| 37 | // $noSixData = []; | 37 | // $noSixData = []; |
| 38 | $noSixData = $this->NoSixProject(); | 38 | $noSixData = $this->NoSixProject(); |
| 39 | -// $sixData = $this->sixProject(); | 39 | + $sixData = $this->sixProject(); |
| 40 | $data = array_merge($noSixData ?? [],$sixData ?? []); | 40 | $data = array_merge($noSixData ?? [],$sixData ?? []); |
| 41 | echo 'success:' .count($data) . PHP_EOL . date('Y-m-d H:i:s'); | 41 | echo 'success:' .count($data) . PHP_EOL . date('Y-m-d H:i:s'); |
| 42 | return true; | 42 | return true; |
| @@ -77,13 +77,11 @@ class CountAllProject extends Command | @@ -77,13 +77,11 @@ class CountAllProject extends Command | ||
| 77 | } | 77 | } |
| 78 | 78 | ||
| 79 | public function httpGetProxy($url){ | 79 | public function httpGetProxy($url){ |
| 80 | - $ip_port = $this->httpGet("http://proxy.globalso.com/get_proxy.php"); | ||
| 81 | $ch1 = curl_init(); | 80 | $ch1 = curl_init(); |
| 82 | $timeout = 0; | 81 | $timeout = 0; |
| 83 | - $proxy = 'http://'.$ip_port; // 替换为你的代理 IP 和端口 | ||
| 84 | curl_setopt($ch1, CURLOPT_URL, $url); | 82 | curl_setopt($ch1, CURLOPT_URL, $url); |
| 85 | curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true); | 83 | curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true); |
| 86 | - curl_setopt($ch1, CURLOPT_PROXY, $proxy); | 84 | + curl_setopt($ch1, CURLOPT_PROXY, 'http://69.90.188.183:51395'); |
| 87 | curl_setopt($ch1, CURLOPT_ENCODING, ''); | 85 | curl_setopt($ch1, CURLOPT_ENCODING, ''); |
| 88 | curl_setopt($ch1, CURLOPT_MAXREDIRS, 10); | 86 | curl_setopt($ch1, CURLOPT_MAXREDIRS, 10); |
| 89 | curl_setopt($ch1, CURLOPT_HTTPHEADER, array()); | 87 | curl_setopt($ch1, CURLOPT_HTTPHEADER, array()); |
| @@ -98,25 +96,6 @@ class CountAllProject extends Command | @@ -98,25 +96,6 @@ class CountAllProject extends Command | ||
| 98 | return json_decode($content, true); | 96 | return json_decode($content, true); |
| 99 | } | 97 | } |
| 100 | 98 | ||
| 101 | - public function httpGet($url){ | ||
| 102 | - $ch1 = curl_init(); | ||
| 103 | - $timeout = 0; | ||
| 104 | - curl_setopt($ch1, CURLOPT_URL, $url); | ||
| 105 | - curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true); | ||
| 106 | - curl_setopt($ch1, CURLOPT_ENCODING, ''); | ||
| 107 | - curl_setopt($ch1, CURLOPT_MAXREDIRS, 10); | ||
| 108 | - curl_setopt($ch1, CURLOPT_HTTPHEADER, array()); | ||
| 109 | - curl_setopt($ch1, CURLOPT_CONNECTTIMEOUT, $timeout); | ||
| 110 | - curl_setopt($ch1, CURLOPT_SSL_VERIFYPEER, FALSE); | ||
| 111 | - curl_setopt($ch1, CURLOPT_SSL_VERIFYHOST, FALSE); | ||
| 112 | - curl_setopt($ch1, CURLOPT_FOLLOWLOCATION, true); | ||
| 113 | - curl_setopt($ch1, CURLOPT_CUSTOMREQUEST, 'GET'); | ||
| 114 | - curl_setopt($ch1, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); | ||
| 115 | - $access_txt = curl_exec($ch1); | ||
| 116 | - curl_close($ch1); | ||
| 117 | - return $access_txt; | ||
| 118 | - } | ||
| 119 | - | ||
| 120 | public function sixProject(){ | 99 | public function sixProject(){ |
| 121 | $projectModel = new Project(); | 100 | $projectModel = new Project(); |
| 122 | $manageModel = new ManageHr(); | 101 | $manageModel = new ManageHr(); |
-
请 注册 或 登录 后发表评论