-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli_prowl.php
More file actions
41 lines (29 loc) · 717 Bytes
/
Copy pathcli_prowl.php
File metadata and controls
41 lines (29 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
$apikey = "<<insert api key>>";
$appname = "<appname>";
$type = 1;
if (isset($argv[1], $argv[2], $argv[3], $argv[4])){
$event = $argv[1];
$desc = $argv[2];
$priority = $argv[3];
$url = $argv[4];
} else {
$type=0;
}
include "class.prowl.php";
if ($type == 0) {
$event = $appname . " EVENT";
$desc = "No Event Information Provided";
$priority = "0";
$url = "";
}
//$prowl = new Prowl($apikey, $appname);
$result = prowl("$apikey", "$appname", "$event", "$desc", "$priority", "$url");
#
# This just prints out the result of the notification.
# uncomment to see results in terminal
#
print "<pre>";
print_r($result);
print "</pre>";/* */
?>