【问题标题】:Connection is refused by apple using APNS in php苹果在php中使用APNS拒绝连接
【发布时间】: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


    【解决方案1】:

    看看here。我认为它会帮助您发送推送通知 ;-)

    【讨论】:

    • 那我觉得你的阅读能力有问题,伙计
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-09-28
    • 2013-05-02
    • 1970-01-01
    • 2021-04-16
    相关资源
    最近更新 更多