Growl notifications from the web
February 24, 2012 3:29 AM   Subscribe

Growl notifications from a PHP script (or Twitter)

I'd like to get an instant growl notification and I'm having a spot of bother working out how to do this.

Ideally I'd host a PHP script on my webserver, which when "called" using GET (causing it to execute) contacted the growl app on my Mac and told it to display a notification.

Or it could be done via Twitter, but the important thing is the notification should be instantaneous - and the twitter notification websites I've found work on a 15 minute SLA!

Any tips? I would prefer the PHP route.

Thanks
posted by dance to Technology (9 answers total)
 
Have you looked at this?
posted by beniamino at 4:30 AM on February 24, 2012


Response by poster: I have ... :)

But it's not the user friendly "service" I was looking for.

Presumably I'd need to do some DYNDNS stuff to allow it to continue to work from IP refresh to refresh...

I'll email the dev.

Thanks anyway!!
posted by dance at 5:53 AM on February 24, 2012


I wonder if you could do something with Boxcar's Provider API? There's a Boxcar PHP Provider too.

Other than that, could you interact with the Twitter API on your own and skip the 15 minute notification issue?
posted by backwards guitar at 6:02 AM on February 24, 2012


The Webkit Notifications API I don't believe actually uses Growl, but does provide a bridge between a web page and a notification.

So using this code, you create a persistent page that calls some source via AJAX / JSONP or something similar, and when it encounters a change in status sends one of these notifications.
posted by artlung at 7:58 AM on February 24, 2012


I would create something on the PHP side that could be queried from the machine you want to receive notifications on, and send the Growl from a script that pulls the page.

$(curl http://foo.com/status.php | grep complete) && send-notification "U got a sale!"

posted by rhizome at 9:56 AM on February 24, 2012


I went to growlforwindows.com and they have a directory of applications which includes several that will give notifications of tweets via growl. A little googling suggests that there's at least one Mac twitter app that also notifies Growl natively.

I have growl installed, but don't use it. I do get alerted to tweets, email messages and facebook statuses with Digsby. If you really just need some notification and it doesn't have to specifically be from growl, Digsby would be a dead simple way to get this done.

Either way involves installing another program and Digsby involves two different notifications, but I don't see the harm and you'd be done in about a minute.
posted by stuart_s at 12:36 PM on February 24, 2012


Response by poster: stuart_s, thanks for those tips. The reason I haven't already used the Growl/Twitter combo is because it's not instant. It's every fifteen minutes or so, isn't it?

rhizome, thanks, but isn't that broadly the same idea as the clickontyler PHP growl link? I don't know how to get Growl listening to that PHP script. :)

Thanks all. Food for thought here.
posted by dance at 3:38 AM on February 25, 2012


Your example is for your webserver to ping back a growl when a particular .php is accessed. My example is for the .php to return only what you want a notification to contain (server is up; last 10 transactions; whatever), then notify the local machine locally depending on what is returned. Pulling your notifications rather than pushing them from the webserver.
posted by rhizome at 10:26 AM on February 25, 2012


Digsby's notifications are pretty fast. Near instantaneous.

I'm still not sure if you're open to using a different notifier but many of the desktop twitter clients have growl-esque notifications. Seesmic has its own Growl-esque notifications. Also Thwirl. I assume that all of them do, frankly. Tweetdeck? And I'm sure they're all also near instantaneous.

I installed a twitter client (twitulator) that does use growls notification system. The notifications were generic. They didn't include the text of the specific tweet. They were near instantaneous though. The default is to check every 36 seconds and you could make it shorter, I believe.

It may be worth your while to check out some of the other twitter clients listed in my link. I'm not sure why you think there's a limit of 15 minutes. I suspect that most of them check several times a minute. I also assume that some of them will include the text of the tweet in the notification if that's important to you. There were about three more that I didn't test out.
posted by stuart_s at 3:05 PM on February 25, 2012


« Older I'm paranoid about my gas range.   |   Internet changing what I type. Newer »
This thread is closed to new comments.