Hello,
You must act as a client, just like you're sending notification. That must be something like:
<?php
$certFile = 'apns-dev.pem';
while(true){
$ctx = stream_context_create();
stream_context_set_option($ctx, 'ssl', 'local_cert', $certFile);
//stream_context_set_option($ctx, 'ssl', 'passphrase', $this->certPass);
echo "try to open stream\n";
$fp = stream_socket_client('ssl://feedback.sandbox.push.apple.com:2196', $err, $errstr, 5, STREAM_CLIENT_CONNECT, $ctx);
if (!$fp) {
print "Failed to connect". $err . $errstr. "\n";
exit();
}
else
{
echo 'Connected to feedback sandbox...';
while(($in = fread($fp, 1024)) != EOF)
{
echo 'read '. $in . "\n";
}
socket_close($fp);
fclose($fp);
}
sleep(2000);
}
?>
xicoras
2009-11-16 17:48:54