Example #1
0
function PushANotification($note)
{
    // Push The notification with parameters
    require_once 'PushBots.class.php';
    $pb = new PushBots();
    // Application ID
    $appID = '570ab8464a9efaf47a8b4568';
    // Application Secret
    $appSecret = '297abd3ebd83cd643ea94cbc4536318d';
    $pb->App($appID, $appSecret);
    // Notification Settings
    $pb->Alert($note);
    $pb->Platform(1);
    // android
    // Push it !
    $res = $pb->Push();
    echo $res['status'];
    echo $res['code'];
    echo $res['data'];
}
Example #2
0
function notificacion($cadena, $user)
{
    require_once 'PushBots.class.php';
    $pb = new PushBots();
    // Application ID
    $appID = '564c0296177959002d8b4569';
    // Application Secret
    $appSecret = '350d1b5bbe16e0ce65ef350f41c92ce1';
    $pb->App($appID, $appSecret);
    // Push to Single Device
    // Notification Settings
    $pb->AlertOne($cadena);
    $pb->PlatformOne("1");
    $pb->TokenOne($user);
    //$pb->Alert($cadena);
    //$pb->Platform(array("0","1"));
    //$pb->Badge("+2");
    //$pb->Push();
    //Push to Single Device
    $pb->PushOne();
}
Example #3
0
function sendmessage($message)
{
    $pb = new PushBots();
    // Application ID
    $appSecret = '01051c0a6ff7ce415584f3718c9c4cc7';
    // Application Secret
    $appID = '56a886bc177959da488b4567';
    $pb->App($appID, $appSecret);
    $customfields = array("PushBots" => "true");
    $pb->Payload($customfields);
    // Notification Settings
    $pb->Alert($message);
    $pb->Platform(array("0", "1"));
    $pb->Badge("+2");
    $pb->AliasData(1, "APA91bFpQyCCczXC6hz4RTxxxxx", "test");
    // set Alias on the server
    $pb->setAlias();
    // Push it !
    $pb->Push();
    return null;
}
Example #4
0
<?php

// Push The notification with parameters
require_once 'PushBots.class.php';
$pb = new PushBots();
// Application ID
$appID = '54d87db91d0ab13c058b45dc';
// Application Secret
$appSecret = '8de769de4171e601071b026319b9cc2f';
$pb->App($appID, $appSecret);
// Notification Settings
$pb->Alert("New Notifications received!");
$pb->Platform(array(0, 1));
$pb->Push();