iOS APN Php 无法连接
iOS APN Php Cannot Connect
我遵循了这个关于如何发送推送通知的 youtube 教程:https://www.youtube.com/watch?v=_3YlqWWnI6s
当我 运行 我的网络服务器上的 php 文件时,它超时给我这个错误。我查看了网络,但我找不到任何问题,有人可以指出我哪里出错了..
[14-Dec-2015 06:13:10 America/New_York] PHP Warning: stream_socket_client(): unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Connection timed out) in /home2/sptechno/public_html/Wink/sendPush.php on line 18
当您 运行 .php
提交 Apple 推送通知时。
那时你需要检查 TCP/UDP 端口号在你的服务器上是否打开,否则通知不会传递给苹果服务器。
General Provider Requirements
As a provider you communicate with Apple Push Notification service
over a binary interface. This interface is a high-speed, high-capacity
interface for providers; it uses a streaming TCP socket design in
conjunction with binary content. The binary interface is asynchronous.
The binary interface of the production environment is available
through gateway.push.apple.com, port 2195; the binary interface of the
development environment is available through
gateway.sandbox.push.apple.com, port 2195.
Apple official document for that.
已编辑
检查您的服务器是否已连接到 APNS。
HOSTGATOR:~ Home$ telnet gateway.sandbox.push.apple.com 2195
Trying 17.149.34.143...
Connected to gateway.sandbox.push-apple.com.akadns.net.
Escape character is '^]'.
我遵循了这个关于如何发送推送通知的 youtube 教程:https://www.youtube.com/watch?v=_3YlqWWnI6s
当我 运行 我的网络服务器上的 php 文件时,它超时给我这个错误。我查看了网络,但我找不到任何问题,有人可以指出我哪里出错了..
[14-Dec-2015 06:13:10 America/New_York] PHP Warning: stream_socket_client(): unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Connection timed out) in /home2/sptechno/public_html/Wink/sendPush.php on line 18
当您 运行 .php
提交 Apple 推送通知时。
那时你需要检查 TCP/UDP 端口号在你的服务器上是否打开,否则通知不会传递给苹果服务器。
General Provider Requirements
As a provider you communicate with Apple Push Notification service over a binary interface. This interface is a high-speed, high-capacity interface for providers; it uses a streaming TCP socket design in conjunction with binary content. The binary interface is asynchronous.
The binary interface of the production environment is available through gateway.push.apple.com, port 2195; the binary interface of the development environment is available through gateway.sandbox.push.apple.com, port 2195.
Apple official document for that.
已编辑
检查您的服务器是否已连接到 APNS。
HOSTGATOR:~ Home$ telnet gateway.sandbox.push.apple.com 2195
Trying 17.149.34.143...
Connected to gateway.sandbox.push-apple.com.akadns.net.
Escape character is '^]'.