PHP code example of joetannenbaum / phpushbullet

1. Go to this page and download the library: Download joetannenbaum/phpushbullet 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/ */

    

joetannenbaum / phpushbullet example snippets




$pushbullet = new PHPushbullet\PHPushbullet('YOUR_ACCESS_TOKEN_HERE');

$pushbullet->devices();

$pushbullet->device('Chrome')->note('Remember', 'Buy some eggs.');

$pushbullet->device('Chrome')->device('Galaxy S4')->note('Remember', 'Buy some eggs.');
// or
$pushbullet->device('Chrome', 'Galaxy S4')->note('Remember', 'Buy some eggs.');
// or
$pushbullet->device(['Chrome', 'Galaxy S4'])->note('Remember', 'Buy some eggs.');

$pushbullet->user('[email protected]')->note('Remember', 'Buy some eggs.');

$pushbullet->user('[email protected]')->user('[email protected]')->note('Remember', 'Buy some eggs.');
// or
$pushbullet->user('[email protected]', '[email protected]')->note('Remember', 'Buy some eggs.');
// or
$pushbullet->user(['[email protected]', '[email protected]'])->note('Remember', 'Buy some eggs.');

$pushbullet->device('Chrome')->note('Musings', 'Why are fudgy brownies better than cakey brownies?');

$pushbullet->device('Chrome')->link('Look It Up', 'http://google.com', 'I hear this is a good site for finding things.');

$pushbullet->device('Chrome')->address('The Hollywood Sign', '4059 Mt Lee Drive Hollywood, CA 90068');

$address = [
  'address' => '4059 Mt Lee Drive',
  'city'    => 'Hollywood',
  'state'   => 'CA',
  'zip'     => '90068',
];

$pushbullet->device('Chrome')->address('The Hollywood Sign', $address);

$items = [
  'Socks',
  'Pants',
  'Keys',
  'Wallet',
];

$pushbullet->device('Chrome')->list('Do Not Forget', $items);

$pushbullet->device('Chrome')->file('The Big Presentation', 'http://example.com/do-not-lose-this.pptx', 'Final version of slides.');