PHP code example of kingscode / appcenter-push
1. Go to this page and download the library: Download kingscode/appcenter-push 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/ */
kingscode / appcenter-push example snippets
// Create a notifier...
$notifier = Notifier::make()
->setOwnerName($ownerName) // Set the owner name.
->setAppName($appName) // Set the app name.
->setToken($token); // Set the api token.
// Create a notification...
$notification = Notification::make()
->setName($name) //Set the notification name.
->setTitle($title) //Set the notification title.
->setBody($body); //Set the notification body.
// And send the notification...
$notifier->send($notification);