作者 lyh

gx

... ... @@ -92,13 +92,15 @@ if (!function_exists('http_get')) {
charset = UTF-8";
}
$ch1 = curl_init();
$timeout = 30;
$timeout = 0;
curl_setopt($ch1, CURLOPT_URL, $url);
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch1, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch1, CURLOPT_HTTPHEADER, $header);
curl_setopt($ch1, CURLOPT_CONNECTTIMEOUT, $timeout);
curl_setopt($ch1, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch1, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch1, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch1, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch1, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
$access_txt = curl_exec($ch1);
curl_close($ch1);
return json_decode($access_txt, true);
... ...
... ... @@ -73,10 +73,9 @@ class WebSettingLogic extends BaseLogic
}
$updateNotifyModel->edit(['status'=>1],['project_id'=>$this->user['project_id'],'status'=>0]);
$urlStr = 'https://'.$this->user['domain'].'/api/updateHtmlNotify?project_id='.$this->user['project_id'];
$rs = $this->curl_get($urlStr);
var_dump($rs);
die();
return $this->success();
// $data = $this->curl_get($urlStr);
$data = http_get($urlStr);
return $this->success($data);
}
public function curl_get($url){
... ... @@ -93,6 +92,6 @@ class WebSettingLogic extends BaseLogic
));
$response = curl_exec($curl);
curl_close($curl);
return $response;
return json_decode($response);
}
}
... ...