Unable to disconnect from APNS-PHP server object?
Closed this issue · 1 comments
GoogleCodeExporter commented
Using the sample code in sample_server.php, I am able to connect to APNS/send
out notifications just fine. However, how might I go about implementing this
code into a script that runs on a scheduled basis, then disconnects when it's
finished sending out alerts? As the sample code stands, it forks the server,
but then the script never seems to terminate (when running from the command
line). Thanks in advance for your help; this is a great project!
Original issue reported on code.google.com by mchatter...@gmail.com
on 24 Aug 2010 at 9:10
GoogleCodeExporter commented
The server should run continually. You have 2 ways to "talk" with your server:
a simple way and a more complex way.
The second one: you could listen from the server on a TCP port (or via socket)
and use a custom protocol to "send" or better queue new push notifications.
The first one: you can "poll" a directory and check for file in this dir. In
every file you can store a "push" notification; when you find a new file you
should read the content and delete that file. Now your server can send this
push notification.
Ciao,
Aldo
Original comment by aldo.arm...@gmail.com
on 25 Aug 2010 at 3:31
- Changed state: Invalid