Hi all I am using following code
<?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);
?>
and I get following warning
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