iOS Mass Push notification using PHP
- Stare: Closed
- Premiu: $15
- Intrări primite: 1
- Câștigător: vaishali1191
Sumarul concursului
We have a php code to send a message to ios Push Registration devices and push notification is working fine if it is sent one by one using this code
$deviceToken = "Actual Device Token";
$ctx = stream_context_create();
stream_context_set_option($ctx, 'ssl', 'local_cert', 'ck.pem');
stream_context_set_option($ctx, 'ssl', 'passphrase', $passphrase);
// Open a connection to the APNS server
//$fp = stream_socket_client('ssl://gateway.push.apple.com:2195', $err, $errstr, 60, STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT, $ctx);
$fp = stream_socket_client('ssl://gateway.push.apple.com:2195', $err, $errstr, 60, STREAM_CLIENT_CONNECT|STREAM_CLIENT_PERSISTENT, $ctx);
if (!$fp)
exit("Failed to connect: $err $errstr" . PHP_EOL);
echo 'Connected to APNS' . PHP_EOL;
$body['aps'] = array(
'alert' => array(
'title' => $ntitle,
'body' => $msg,
),
'url' => $nurl,
'sound' => 'default'
);
We need a code to send it in batches to 1000 like android allows.
Secondly we want to know which device tokens failed.
Aptitudinile recomandate
Feedback de la Angajator
“very nice work”
safelistad, India.
Panoul public de clarificare
Cum să începi concursurile
-
Postează-ți concursul Rapid și ușor
-
Obține o mulțime de intrări Din întreaga lume
-
Premiază cea mai bună intrare Descarcă ușor fișierele