PHP code example of ampersa / pushover

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

    

ampersa / pushover example snippets


$client = new Pushover;
$response = $client->title('Testing')
                    ->message('Just a quick test of <b>Ampersa\Pushover</b>')
                    ->sound('cashregister')
                    ->priority(Pushover::PRIORITY_EMERGENCY)
                    ->retry(30)
                    ->expires(600)
                    ->html(true)
                    ->url('https://www.google.com', 'Google')
                    ->user('xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx')
                    ->send();

var_export($response);