正在显示
1 个修改的文件
包含
14 行增加
和
14 行删除
| @@ -298,19 +298,19 @@ class LoginController extends BaseController | @@ -298,19 +298,19 @@ class LoginController extends BaseController | ||
| 298 | } | 298 | } |
| 299 | 299 | ||
| 300 | public function ceshi(){ | 300 | public function ceshi(){ |
| 301 | - $curl = curl_init(); | ||
| 302 | - curl_setopt_array($curl, array( | ||
| 303 | - CURLOPT_URL => 'https://demo.globalso.site/api/updateHtmlNotify/?project_id=1&type=2&route=1', | ||
| 304 | - CURLOPT_RETURNTRANSFER => true, | ||
| 305 | - CURLOPT_ENCODING => '', | ||
| 306 | - CURLOPT_MAXREDIRS => 10, | ||
| 307 | - CURLOPT_TIMEOUT => 0, | ||
| 308 | - CURLOPT_FOLLOWLOCATION => true, | ||
| 309 | - CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, | ||
| 310 | - CURLOPT_CUSTOMREQUEST => 'GET', | ||
| 311 | - )); | ||
| 312 | - $response = curl_exec($curl); | ||
| 313 | - curl_close($curl); | ||
| 314 | - return $response; | 301 | + $ch1 = curl_init(); |
| 302 | + $timeout = 0; | ||
| 303 | + curl_setopt($ch1, CURLOPT_URL, 'https://demo.globalso.site/api/updateHtmlNotify/?project_id=1&type=2&route=1'); | ||
| 304 | + curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true); | ||
| 305 | + curl_setopt($ch1, CURLOPT_ENCODING, ''); | ||
| 306 | + curl_setopt($ch1, CURLOPT_MAXREDIRS, 10); | ||
| 307 | + curl_setopt($ch1, CURLOPT_HTTPHEADER, []); | ||
| 308 | + curl_setopt($ch1, CURLOPT_CONNECTTIMEOUT, $timeout); | ||
| 309 | + curl_setopt($ch1, CURLOPT_FOLLOWLOCATION, true); | ||
| 310 | + curl_setopt($ch1, CURLOPT_CUSTOMREQUEST, 'GET'); | ||
| 311 | + curl_setopt($ch1, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1); | ||
| 312 | + $access_txt = curl_exec($ch1); | ||
| 313 | + curl_close($ch1); | ||
| 314 | + return json_decode($access_txt, true); | ||
| 315 | } | 315 | } |
| 316 | } | 316 | } |
-
请 注册 或 登录 后发表评论