|
|
@@ -274,7 +274,7 @@ class MainController extends BackendController
|
|
|
$params = json_encode($data,JSON_UNESCAPED_UNICODE);
|
|
|
$start_time = microtime(true);
|
|
|
|
|
|
- $fp = fsockopen('api.weixin.qq.com', 80, $error, $errstr, 3);
|
|
|
+ $fp = fsockopen('ssl://api.weixin.qq.com', 80, $error, $errstr, 3);
|
|
|
$http = "POST /cgi-bin/message/template/send?access_token={$accessToken} HTTP/1.1\r\nHost: api.weixin.qq.com\r\nContent-type: application/x-www-form-urlencoded\r\nContent-Length: " . strlen($params) . "\r\nConnection:close\r\n\r\n$params\r\n\r\n";
|
|
|
fwrite($fp, $http);
|
|
|
fclose($fp);
|