Redth / PushSharp

A server-side library for sending Push Notifications to iOS (iPhone/iPad APNS), Android (C2DM and GCM - Google Cloud Message), Windows Phone, Windows 8, Amazon, Blackberry, and (soon) FirefoxOS devices!
Other
4.38k stars 1.52k forks source link

Linux and PHP #301

Closed pmbnecc closed 10 years ago

pmbnecc commented 10 years ago

How do I send push notifications using PHP? When something changes on my web site, I would to send a notification using PushSharp.

normanhh3 commented 10 years ago

I would suggest putting the messages you want to send into a message queue from your website. 1) You get isolation from the push notification delivery stuff 2) You add the ability to retry sending of failed messages for delivery (it happens more often than you might imagine!).

I haven't worked with Mono on Linux in ages, but you'll need to determine if the PushSharp libraries are compatible, if not, you'll need to create a branch and make the appropriate changes.

I would suggest using a library called Topshelf to use as a wrapper for your daemon that pulls messages off of the message queue and delivers them via the appropriate methodology for your clients.

Good luck!

On Sun, Dec 15, 2013 at 10:24 PM, pmbnecc notifications@github.com wrote:

How do I send push notifications using PHP? When something changes on my web site, I would to send a notification using PushSharp.

— Reply to this email directly or view it on GitHubhttps://github.com/Redth/PushSharp/issues/301 .

Redth commented 10 years ago

@normanhh3 has a great answer... There is no direct compatibility with PHP, so you'd have to run PushSharp on Mono... I'd also suggest there are likely PHP libs out there for achieving this goal as well.