Search code examples
iphone-sdk-3.0hostingserver-pushapple-push-notifications

Getting error when connecting to APNS using PHP


Warning: Invalid argument supplied for foreach() in /home/content/t/3/k/t3kmast3r/html/PushService.php on line 13

Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Connection refused) in /home/content/t/3/k/t3kmast3r/html/PushService.php on line 53 Failed to connect 111 Connection refused Fatal error: Call to undefined function socket_close() in /home/content/t/3/k/t3kmast3r/html/PushService.php on line 98

I have godaddy.com's hosting service. Does someone know about godaddy.com support APNS?


Solution

  • The error seems like the destination server "ssl://gateway.sandbox.push.apple.com:2195" rejected your connection. You might want to check with Apple's documentations or contact either GoDaddy, Apple, or both.