PHP利用数据库的openid微信群发模板消息
苏康申 2018-03-05 07:45:44 利用openid在后台利用curl模拟请求 非常耗时 大家有没有好的办法
但是利用
$fp = fsockopen('api.weixin.qq.com', 80, $error, $errstr, 1);
$http = "POST /cgi-bin/message/template/send?access_token={$access_token} 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";
$msg = fwrite($fp, $http);
挺快的 但是得不到发送的结果是否成功
大家提点建议