1. Go to this page and download the library: Download ivkos/pushbullet 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/ */
ivkos / pushbullet example snippets
// Get your access token here: https://www.pushbullet.com/account
$pb = new Pushbullet\Pushbullet('YOUR_ACCESS_TOKEN');
Pushbullet\Connection::setCurlCallback(function ($curl) {
// Get a CA certificate bundle here:
// https://raw.githubusercontent.com/bagder/ca-bundle/master/ca-bundle.crt
curl_setopt($curl, CURLOPT_CAINFO, 'C:/path/to/ca-bundle.crt');
// Not recommended! Makes communication vulnerable to MITM attacks:
// curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
});
$pb->device("Galaxy S4")->pushFile(
"/home/ivkos/photos/20150314_092653.jpg",
"image/jpeg",
"Look at this photo!",
"I think it's pretty cool",
"coolphoto.jpg"
);