Pushover
- Info : makes it easy to get real-time notifications
- Author : Superblock, LLC
- Website : pushover.net/
- Support : reddit.com/r/pushover
- Download : pushover.net/clients
- Screenshot : iPhone
- Browser : Any
- Languages : Any
[spoiler=Description]
It allows you to receive push notifications on all devices (mobile, desktop), although in this case we are interested in iOS.
RSS news readers allow Android notifications, there is not is none for iOS enabling notifications. With the simple PHP code you can call your own RSS and send messages to Pushover to receive them as a notification.
Only receive a notification: no interaction with game.
[/spoiler]
[spoiler=PHP code example]
PHP Source Code
- $url = "http://<USERNAME>:<PASSWORD>@<URL_RSS>";
- $feed = file_get_contents($url);
- $xml = new SimpleXmlElement($feed);
- foreach( $xml->channel->item as $msg ) {
- //(1)
- //(2)
- //Code from Pushover website
- curl_setopt_array($ch = curl_init(), array(
- CURLOPT_URL => "https://api.pushover.net/1/messages.json",
- CURLOPT_POSTFIELDS => array(
- "token" => "<PUSHOVER_TOKEN>",
- "user" => "<PUSHOVER_API>",
- "message" => $msg->title,
- ),
- CURLOPT_SAFE_UPLOAD => true,
- ));
- curl_exec($ch);
- curl_close($ch);
- }
- //(1) Can add a parsing title to get only specific type of message
- //(2) Can add insert in MySQL to match duplicate message
[/spoiler]
Is a possible tool tolerated?