當我執行下面的代碼是越來越連接失敗:0推送通知
連接失敗:0
1)我爲.pem文件路徑是correct.Below是我執行的代碼。 Iam對於代碼中發生的這些dono wats是全新的。
我把下面的代碼
$deviceToken = '44fb58e8011392a1569ddc73ff96d028b5d78739258678455a16abf4e55fa1c1';
//$deviceToken = '44fb58e8011392a1569ddc73ff96d028b5d78739258678455a16abf4e55fa1c1';
// Put your private key's passphrase here:
$passphrase = 'zFaMRvDh7vGTPqh3k+72uz0SzOh3knVZc99OPqkJ3llbYWbpQnRNAKY7TGJu7kg8';
// Put your alert message here:
$message = 'Thank you for Trying Arial 1. Do not forget to enter your feedback to earn TNB points within 10 days';
////////////////////////////////////////////////////////////////////////////////
$ctx = stream_context_create();
stream_context_set_option($ctx, 'ssl', 'local_cert', 'http://dev.trynbuyindia.com/ck.pem');
stream_context_set_option($ctx, 'ssl', 'passphrase', $passphrase);
// Open a connection to the APNS server
$fp = stream_socket_client(
'ssl://gateway.sandbox.push.apple.com:2195', $err,
$errstr, 60, STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT, $ctx);
if (!$fp)
exit("Failed to connect: $err $errstr" . PHP_EOL);
http://dev.trynbuyindia.com/ck.pem這是正確的 – morroko
你可以點擊並檢查那邊的pem文件!!!!! – user2715615
https://code.google.com/p/apns-php/issues/detail?id=1檢查此 – morroko