title: iPhone: Connection refused error while connection Apple's Push Notification Service
body: <p>I have been scratching my head since long now to get rid of following error message.</p>
  
  <p>Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.push.apple.com:2195 (Connection refused)</p>
  
  <p>I have tried multiple times generating the correct certificate and made sure that project is signed with the correct bundle identifier. </p>
  
  <p>I have also tried using testing script PHP(https://devforums.apple.com/message/50461) and Python (http://stackoverflow.com/questions/1052645/apple-pns-push-notification-services-sample-code) but both are giving same error message.</p>
  
  <p>Could anyone please help me to know how to get rid of this error message?</p>
  
  <p>Thanks.</p>