Pushover 10 Oct 2013

About 2 month ago, I found a nice service going by the name of pushover.net.

"Pushover makes it easy to send real-time notifications to your Android and iOS devices."

I had a look around for a decent PHP library, but could not find one. Most of them either had way too much code for such a simple task (it’s basically a curl call), or where totally untested.

The library I built is very easy to use, and easy to setup. Below you can see an example of how to send a push notification:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
include __DIR__ . '/vendor/autoload.php';

$pushover = new \Scottymeuk\Pushover\Client([
    'token' => '',
]);
$pushover->message = 'testing';

// Push Single
$push = $pushover->push($token);

// Push Multiple
$push = $pushover->pushMultiple([
    $token1,
    $token2
]);

The only downside to pushover.net is that the app costs, but with the amount of things I use it for, its been worth it.

If you wish to try out the library, then you can view it on Github.

Can’t think of a use case? I built a quick CLI tool using the library to make it easy to push things to your mobile from your desktop. You can view that on Github too.

If you do happen to use any of these, please let me know in the comments below.