PHP code example of kiwi-suite / pushing-kiwi-client

1. Go to this page and download the library: Download kiwi-suite/pushing-kiwi-client 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/ */

    

kiwi-suite / pushing-kiwi-client example snippets


$iosMessage = new IosMessage([
    'title' => "string",
    'body' => "string",
    'launchImage' => "string",
    'badge' => 1,
    'sound' => "string",
    'payload' => ["key" => "value"],
    'priority' => 5,
    'deviceIds' => ["deviceToken1", "deviceToken2"],
]);

$androidMessage = new AndroidMessage([
    'payload' => ["key" => "value"],
    'deviceIds' => ["deviceToken1", "deviceToken2"],
]);

$notification = new Notification("my_secret_token", [$iosMessage, $androidMessage]);
$psr7Request = $notification->createHttpRequest();
$yourHttpClient->send($psr7Request);