PHP code example of snider / php-notify-my-android

1. Go to this page and download the library: Download snider/php-notify-my-android 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/ */

    

snider / php-notify-my-android example snippets



namespace snider\NotifyMyAndroid;

$application = 'snider/php-notify-my-android';
$event       = 'Sample Event';
$description = 'This is a sample event notification.';

$nma = new Api(array('apikey' => $apiKey));
if ($nma->verify()) {
    if ($nma->notify($application, $event, $description)) {
        echo 'Notification sent';
    }
}