PHP code example of irontec / push-notifications

1. Go to this page and download the library: Download irontec/push-notifications library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

irontec / push-notifications example snippets




$android = new PushNotifications\Android();

$android->setApikey('******');
$android->setDeviceToken('');
$android->setMessage('');
$android->setExtraData(array('a' => 1, 'b' => 2));

$android->send();




$ios = new PushNotifications\IOS();

$ios->setEnvironment(1);
$ios->setPassphraseDev('******');
$ios->setPemDev('/certs/dev/app.pem');

$ios->setWriteInterval(1);
$ios->setSendRetryTimes(1);
$ios->setConnectTimeout(1);
$ios->setExpiry(60);

$ios->setDeviceToken('');
$ios->setMessage('');
$ios->setExtraData(array('a' => 1, 'b' => 2));
$ios->send();