20 lines
417 B
PHP
20 lines
417 B
PHP
<?php
|
|
|
|
require 'vendor/autoload.php';
|
|
$loader = new josegonzalez\Dotenv\Loader(__DIR__.'/.env');
|
|
$loader->parse();
|
|
$loader->putEnv();
|
|
|
|
$token = getenv('PB_TOKEN');
|
|
|
|
try {
|
|
$pushbullet = new Pushbullet\Pushbullet($token);
|
|
} catch (\Exception $e) {
|
|
print $e->getMessage() . PHP_EOL;
|
|
}
|
|
|
|
$pushResult = $pushbullet
|
|
->device('Google Pixel XL')
|
|
->pushNote('Hello!', 'How are you?')
|
|
;
|
|
print_r($pushResult); |