【发布时间】:2011-01-28 10:50:25
【问题描述】:
大家好,我正在使用以下代码
<?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() [function.stream-socket-client]:无法连接到 /home/xxxxxxxxxx/public_html/apns1 中的 ssl://gateway.sandbox.push.apple.com:2195(连接被拒绝) /Push1.php 在第 9 行 连接被拒绝
【问题讨论】:
标签: iphone apple-push-notifications