new layout
This commit is contained in:
parent
005541a96f
commit
1ee7a6234a
17 changed files with 2353 additions and 2 deletions
21
bin/notify
Executable file
21
bin/notify
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/php
|
||||
<?php
|
||||
$script = array_shift($_SERVER['argv']);
|
||||
$settings['token'] = 'ayndqf6fdyjo9pua8reusvvb733k1u';
|
||||
$settings['user'] = 'uesmxehx2bcuyv5prfrw39ema2312f';
|
||||
$settings['title'] = array_shift($_SERVER['argv']);
|
||||
$settings['message'] = array_shift($_SERVER['argv']);
|
||||
$settings['priority'] = 1;
|
||||
|
||||
$curl = curl_init("https://api.pushover.net/1/messages.json");
|
||||
|
||||
curl_setopt($curl, CURLOPT_POST, true);
|
||||
curl_setopt($curl, CURLOPT_POSTFIELDS, $settings);
|
||||
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
|
||||
|
||||
$return = curl_exec($curl);
|
||||
curl_close($curl);
|
||||
|
||||
$json = json_decode($return, true);
|
||||
|
||||
if(isset($json['info'])) echo("Result: ${json['info']}");
|
Loading…
Add table
Add a link
Reference in a new issue