The local calling interface of php fsockopen in win10 is normal, but the calling under linux and nginx fails. OpenSSL is turned on. I don't know why?
phpcn_u1582
phpcn_u1582 2017-05-16 12:02:37
0
2
487
    $params = json_encode($template,JSON_UNESCAPED_UNICODE);
    $fp = fsockopen('api.weixin.qq.com', 80, $error, $errstr, 1);
    $http = "POST /cgi-bin/message/template/send?access_token={$access_token} HTTP/1.1 ".PHP_EOL."Host: api.weixin.qq.com".PHP_EOL."Content-type: application/x-www-form-urlencoded".PHP_EOL."Content-Length: " . strlen($params) .PHP_EOL. "Connection:close".PHP_EOL.PHP_EOL.$params.PHP_EOL.PHP_EOL;
    fwrite($fp, $http);
    fclose($fp);
phpcn_u1582
phpcn_u1582

reply all(2)
迷茫

Use curl to go

巴扎黑

Print phpinfo to view disable_functions

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template