How to growl from php

I am trying to send debugged notifications from PHP. The host computer is OSX, and I can receive local notifications, as well as notifications from ruby ​​scripts executed from other computers. Password not set.

I am using the php-growl class and my code is as follows:

<?php
    require 'class.growl.php';

    $ip_address = '10.0.0.210';

    $growl = new Growl($ip_address, '');

    // Register with the remote machine.
    // You only need to do this once.
    $growl -> register();

    // Send your message
    $growl -> notify('PHP Growl', 'Title', 'Here\ the body text');
?>

My script was registered in growl locally, but the notification was not displayed. I also cannot find PHP errors in my log files.

Any suggestions on how to send / receive growls without using a password ?

+3
source share
1 answer

. Growl, , .

<?PHP
    $growl = new Growl($ip_address);

    // Adding and registering your notifications with Growl
    // only needs to be done once per computer. Growl will
    // remember your app after this.
    $growl->addNotification('Notification Name');
    $growl->addNotification('Another Notification');
    $growl->register();

    // Send a notification
    $growl->notify('Notification Name', 'Some Title', 'Some message to display');

    // Send a second notification
    $growl->notify('Another Notification', 'Another Title', 'Something useful I hope.');
+3

All Articles