大家好,我正在使用下面的代码
<?php
$apnsHost = 'gateway.sandbox.push.apple.com';
$apnsPort = 2195;
$apnsCert = 'Developck.pem';
$streamContext = stream_context_create();
stream_context_set_option($streamContext, 'ssl', 'local_cert', $apnsCert);
$apns = stream_socket_client('ssl://' . $apnsHost . ':' . $apnsPort, $error,$errorString, 2, STREAM_CLIENT_CONNECT, $streamContext);
echo($errorString);
?>我得到了以下警告
警告: stream_socket_client()函数.stream-socket-client:无法连接到/home/xxxxxxxxxx/public_html/apns1/Push1.php第9行中的ssl://gateway.sandbox.push.apple.com:2195 (拒绝连接)连接
发布于 2011-01-28 19:09:19
看看here吧。我认为它将帮助您发送推送通知;-)
https://stackoverflow.com/questions/4827371
复制相似问题