This guide documents the final stable version 2.7.0
Introduction
Net_Growl is a PHP Library that makes it possible to easily send a notification from your PHP script to Growl.
Until now there were many UDP PHP implementations, but none for the new Growl Notification Transport Protocol (GNTP) - v1.0
I’ve decided to enlarge work begun by Bertrand Mansion with the PEAR::Net_Growl package (v 0.7.0).
While you can find some old compatible PHP4 versions (0.8.0b1, 0.9.0b1, 0.9.0b2), I’ve decided, with final stable version 2.0.0, to drop support of PHP4.
I’m focus now on a unique PHP5 library that includes all features of GNTP 1.0
Two different protocols may be used: the basic UDP (compatible with all platforms), and the new one GNTP.
The major version 2 is a full rewrites to PHP5, that used exceptions to raise errors.
Its recommanded to migrate to PHP5, because PHP4 version is not maintained anymore. |
Features
Net_Growl provides :
UDP is limited to some features :
-
Application and notification icons are not provided by PHP scripts.
-
Callbacks are not supported.
GNTP is better than UDP :
-
Application and notification icons may be provided by PHP scripts.
-
Callbacks may be supported. (not yet with Net_Growl beta1)
-
Different Hash and Encryption backend : MD5, SHA1 (for version 0.9.0b1) plus SHA256 and SHA512 (for version 2.0.0b1)
Log framework used with version 0.9.0b1 is PEAR::Log package. While versions since 2.0.0b1 uses no particular log framework (basic text file I/O).
Both versions may send notifications without to call the Net_Growl::register() function. Net_Growl will do it for you at first notification.
If Application and Notification icons are invalid or not reachable, Net_Growl display the default Growl Logo.
since version 2.7.0, you have ability to define the default growl icon
to use (see defaultIcon option), and its location (see resourceDir option). |
Requirements
-
Growl requires Mac OS X 10.5 or higher.
-
Growl for Windows is a Windows-compatible version of Growl, a notification system for Mac OS X.
-
mcrypt extension when using GNTP adapter and encryt feature
Installation
Head to the Install Guide if it’s your first use with Net_Growl.
Net_Growl may be installed in several ways, choose your favorite.
Getting Started
See our tutorial to learn how to get started with your first notification.
-
learn how to secure your communication