title: Connection is refused by apple using APNS in php
body: <p>Hi all I am using following code</p>
  
  <pre><code>&lt;?php
  $apnsHost = 'gateway.sandbox.push.apple.com';
  $apnsPort = 2195;
  $apnsCert = 'Developck.pem';
  
  $streamContext = stream_context_create();
  stream_context_set_option($streamContext, 'ssl', 'local_cert', $apnsCert);
  
  $apns = stream_socket_client('ssl://' . $apnsHost . ':' . $apnsPort, $error,$errorString, 2, STREAM_CLIENT_CONNECT, $streamContext);
  echo($errorString);
  ?&gt;
  </code></pre>
  
  <p>and I get following warning </p>
  
  <p>Warning: stream_socket_client() [function.stream-socket-client]: unable to connect to ssl://gateway.sandbox.push.apple.com:2195 (Connection refused) in /home/xxxxxxxxxx/public_html/apns1/Push1.php on line 9
  Connection refused</p>