【发布时间】:2018-06-15 14:18:02
【问题描述】:
我有一个应该发送 IOS 推送消息的代码,但它给了我一个错误。
我的代码:
$streamContextCreate = stream_context_create();
stream_context_set_option($streamContextCreate, 'ssl', 'local_cert', '/home/devmzad/public_html/public/ios/MzadDevCertificates.pem');
$fp = stream_socket_client(
'ssl://gateway.push.apple.com:2195', $err,
$errstr, 60, STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT, $streamContextCreate);
echo "<pre>";
print_r($fp); //gives error here.
die;
我收到的错误如下:
stream_socket_client():SSL 操作失败,代码为 1。OpenSSL 错误消息: 错误:14094438:SSL 例程:SSL3_READ_BYTES:tlsv1 警报内部错误
如果有人可以帮助我,我将不胜感激。谢谢。
【问题讨论】:
标签: php ios ssl apple-push-notifications