PHP code example of notify-events / php
1. Go to this page and download the library: Download notify-events/php 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/ */
notify-events / php example snippets
// Defining channel token.
// You get this token when creating a channel on the Notify.Events service.
$myChannelToken = 'XXXXXXXX';
// Create a message object.
$message = new Message('Some <b>important</b> message', 'Title', Message::PRIORITY_HIGH, Message::LEVEL_ERROR);
// Attach the file to the message.
$message->addFile('path\to\local\file');
// Send a message to your channel in Notify.Events.
$message->send($myChannelToken);
php composer.phar
"notify-events/php": "~1.0"