Exemple #1
0
<?php

include_once 'includes/ProwlPHP.php';
require_once 'includes/mysql.inc.php';
include_once 'includes/prowl.inc.php';
// Provider key
$res = mysql_query("SELECT * FROM `users` WHERE `prowl_api_key`!=''");
while ($row = mysql_fetch_assoc($res)) {
    echo $row['email'], ' (', $row['prowl_api_key'], '): ';
    $prowl = new Prowl($row['prowl_api_key'], false, $prowl_provider_key);
    $options = array('application' => 'VoiceGrowl', 'event' => 'Service Change', 'description' => 'VoiceGrowl users:' . "\n" . 'A recent server change means you need to change a GMail filter setting.' . "\n" . 'See http://bit.ly/5lB4hE for more info.' . "\n\n" . 'Email voicegrowl@ub3rk1tten.com or Twitter @t3hub3rk1tten for support', 'priority' => 1);
    $prowl->push($options, true);
    if ($err = $prowl->getError()) {
        echo $err;
    }
    echo '<br />';
}
<?php

include_once 'includes/ProwlPHP.php';
include_once 'includes/prowl.inc.php';
$keys = explode(',', $_GET['key']);
foreach ($keys as $key) {
    $prowl = new Prowl($key, false, $prowl_provider_key);
    $options = array('application' => 'VoiceGrowl', 'event' => 'Test Message', 'description' => 'This is a test message from VoiceGrowl, sent to you by ' . $_SERVER['REMOTE_ADDR'], 'priority' => 0);
    $prowl->push($options, true);
    echo $prowl->getError() . '<br />';
}
Exemple #3
0
<?php

include 'ProwlPHP.php';
$prowl = new Prowl('APIKEY');
$prowl->push(array('application' => 'Application', 'event' => 'Event', 'description' => 'Test message! \\n Sent at ' . date('H:i:s'), 'priority' => 0), true);
var_dump($prowl->getError());
// Optional
var_dump($prowl->getRemaining());
// Optional
var_dump(date('d m Y h:i:s', $prowl->getResetdate()));
// Optional