苹果推送通知不工作共享服务器上 [英] Apple Push Notification not working on shared server
问题描述
我想从PHP脚本发送APN(苹果推送通知)。我的PHP脚本工作正常,我在iPhone设备从本地主机发送时收到通知以及但是当我上传同样的脚本相同.pem文件到共享服务器
它返回错误...
I want to send APN (Apple Push Notification) from PHP script. My PHP script is working fine and I receive notification in the iphone device as well when sending from localhost but when I upload the same script with same .pem file to the shared server
it returns error...
Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.push.apple.com:2195 (Connection refused) in /mypath/SendPushNotification.php on line 28 Failed to connect: 111 Connection refused
从一些源代码,我得到知道送APN端口2195必须是开放的,这是不可能的共享服务器的计划。所以,我尝试使用专用的服务器,它的工作完美,我收到设备上的通知。我努力找到共享服务器的解决方案,但没有找到任何解决方案。
From some source I get to know that to send APN port 2195 must be open which is not possible in the shared server plan. So I tried using dedicated server and it's working perfectly and I receive the notification on the device. I tried hard to find the solution for shared server but didn't find any solution.
我的问题:是否有可能派不APN从共享服务器打开端口2195?如果是给一些指导。
My question: is it possible send APN without opening port 2195 from shared server? if Yes give some guidance.
推荐答案
没有,它无法发送消息APN不使用2195端口。
No, Its not possible to send APN message without using 2195 port.
如果您想从共享服务器发送推送通知信息,请尝试使用一些第三方工具,如 http://urbanairship.com/ 。
If you want to send push notification message from shared server, try using some third party tools like http://urbanairship.com/.
这篇关于苹果推送通知不工作共享服务器上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!