appdb-official / php-push-sender

PHP library to send push notifications via appdb push service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PHP push notification send library

This library allows you to send push notifications to your apps that are published on appdb.

More information about appdb push notification service can be found on Documentation website

Installation

composer require appdb/php-push-sender

Sending of push notification (sample code)

require_once 'vendor/autoload.php';

$sender = new \Appdb\PhpPushSender\PhpPushSender('push_xxx', 'xxx');


$payload = [
    'aps' => [
        'alert' => [
            'title' => 'test',
            'subtitle' => 'test notification',
            'body' => 'test at ' . date('r')
        ]
    ]
];

$destinations['c_xxx'] = []; // sending to this customer
// OR
$destinations['c_xxx'][] = 'd_xxx';  // sending to specific device of customer


$pushSendResult = $sender->send($payload, $destinations);

var_dump($pushSendResult);

About

PHP library to send push notifications via appdb push service

License:GNU General Public License v3.0


Languages

Language:PHP 100.0%