"Push" information via PHP
Posted: Sat Nov 07, 2009 6:42 am
Hi,
I'm wondering if it's possible to design a system that can "push" information to a connected client using PHP/Apache. My idea is that a client sets up a connection and waits for the server to return a response indicating that there is new information waiting on the server. If I built the server, I would probably have some sort of internal connection list with an identifier associated with each connection and when new information became available I would know exactly which connection to send the response to. My question is, is something like this possible with PHP, how can I keep an internal "list" of connected clients and trigger a response to one on demand?
Thanks
I'm wondering if it's possible to design a system that can "push" information to a connected client using PHP/Apache. My idea is that a client sets up a connection and waits for the server to return a response indicating that there is new information waiting on the server. If I built the server, I would probably have some sort of internal connection list with an identifier associated with each connection and when new information became available I would know exactly which connection to send the response to. My question is, is something like this possible with PHP, how can I keep an internal "list" of connected clients and trigger a response to one on demand?
Thanks