How to send Bulk(more than 1000) Push notification? (I'm I doing it rite?)

2,370 views
Skip to first unread message

Dasun Sameera Weerasinghe

unread,
Dec 1, 2012, 3:52:49 AM12/1/12
to apns...@googlegroups.com
I have to send same push-notification to 1000 to 5000 devices using a batch process. Here how my code looks like. Help me to find out that I'm I doing this rite or wrong before it goes for production. :)

   $push = new ApnsPHP_Push(
            ApnsPHP_Abstract::ENVIRONMENT_SANDBOX,
            'PushCertificates.pem'
    );
    $push->setRootCertificationAuthority('entrust_root_certification_authority.pem');
    $push->connect();
    $message = new ApnsPHP_Message();
    $message->setBadge(intval($Badge));
    $message->setSound($Sound);
    $message->setText($MessageText);
    //$deviceTokens contains DeviceTokens as an arry :)
    if(count($deviceTokens)>0){
        foreach($deviceTokens as $deviceToken){
            try{
            $message->addRecipient($deviceToken);
            }catch (Exception $ex) {
                //To Do: Invalid device token. Remove it form the system.
            }
        }
        $push->add($message);
        $push->send();
    }
    $push->disconnect();


flori...@3dmagicbox.com

unread,
Dec 11, 2012, 4:12:49 AM12/11/12
to apns...@googlegroups.com
Use http://pushwizard.com

Free for unlimited devices and they can send 250 million messages per hour.

You can never ever make your own server that can do that.

hijacke...@gmail.com

unread,
Jun 15, 2018, 7:55:05 AM6/15/18
to apns-php
is it still avaiable now?
Reply all
Reply to author
Forward
0 new messages