How to check connectivity of apns port 2195 from my hosting server?

后端 未结 5 1681
暗喜
暗喜 2020-12-13 10:31

I want to check if Push Notification can be done using a hosting server before purchasing hosting plan.what is the shortest way to check this.Also i have godaddy.com\'s host

相关标签:
5条回答
  • 2020-12-13 10:54

    I also had this issue with GoDaddy. Amazon Web Services did the trick for me. It allows you to easily deploy a PHP script which can be called anywhere on the web.

    0 讨论(0)
  • 2020-12-13 11:08
    Use Curl if telnet command is not available.
    curl -v telnet://gateway.sandbox.push.apple.com:2195
    * Rebuilt URL to: telnet://gateway.sandbox.push.apple.com:2195/
    *   Trying 17.188.137.190...
    * TCP_NODELAY set
    * Connected to gateway.sandbox.push.apple.com (17.188.137.190) port 2195 (#0)
    
    Press Escape to close the connection
    * Closing connection 0
    
    0 讨论(0)
  • 2020-12-13 11:09

    I just purchased my Godaddy account to find out it blocks all connections except 80 and one other. In other words we can't use the 2195 connection that is required. If you find another one please let me know.

    0 讨论(0)
  • 2020-12-13 11:12

    You can confirm definitively by using telnet and specifying which port to connect to. From the command line run:

    MyServer:~ 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 '^]'.
    

    If there is an error connecting then it will just hang and not return - the above shows a working example where I can connect.

    You'll need an SSH login to your hosting service to test it this way, and unfortunately you are unlikely to be able to test it without buying an account - so you probably have to rely on asking their customer services.

    Be aware that basic hosting packages normally just provide an FTP login to let you serve up files, you'll usually have to pay extra to get a hosting package which provides SSH access (which you'll need if you are going to run code to connect to the Apple Push Notification Servers).

    0 讨论(0)
  • 2020-12-13 11:13

    if your system does not have telnet, you can make use of curl to do the job.

    curl -v telnet://gateway.sandbox.push.apple.com:2195
    

    here -v is for verbose output

    0 讨论(0)
提交回复
热议问题