snider / php-notify-my-android
PHP library for NotifyMyAndroid.com which does not require cURL
Installs: 59
Dependents: 0
Suggesters: 0
Security: 0
Stars: 14
Watchers: 4
Forks: 10
Open Issues: 4
pkg:composer/snider/php-notify-my-android
This package is not auto-updated.
Last update: 2021-04-16 23:44:39 UTC
README
snider/php-notify-my-android
This is a PHP library for NotifyMyAndroid.com that does not require curl.
If you find a bug, or think of an improvement, please fork the repository and submit a pull request.
I have had a nexus 5 since it came out and am now actually using the lib. If I find any improvements, I can test them myself. :) Yay!
Usage
A basic approach at using this package could look like this:
<?php namespace snider\NotifyMyAndroid; require_once realpath(__DIR__ . '/vendor') . '/autoload.php'; $apiKey = 'insertYourApiKeyHere'; $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'; } }
Use the included sample.php to try it for yourself.
License
See LICENSE.txt for full license details.