After trying several methods (growlnotify, growl UDP, and triggered
Applescript) I've found the best way for me (low overhead, few
dependencies, simplicity, features) to trigger Growl from my PHP
services is to use osascript one-liners. A class definition follows,
suggestions/comments welcome!
growl.php:
<?php
class growl{
public static function register($o){$o['n']='{"'.implode('","',
$o['n']).'"}';
self::send('register as application "'.$o['a'].'" all notifications '.
$o['n'].' default notifications '.$o['n'].' icon of application "'.
$o['ai'].'"');}
public static function notify($o){
self::send('notify with name "'.$o['n'].'" title "'.$o['t'].'"
description "'.$o['m'].'" application name "'.$o['a'].'"');
}
private static function send($m){`osascript -e 'tell application
"GrowlHelperApp" to $m'`;}
}
?>
--
You received this message because you are subscribed to the Google Groups
"Growl Discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/growldiscuss?hl=en.