4 ms·
Ask HN: What's the best way to do COMET in PHP?
What technologies would you use to create a COMET application, that scales well, in PHP?
- Charuru 16y agoDon't do it. Learning another language is much easier than you think, and will be extremely helpful for your long term career. node.js + socket.io blows any php comet solution out of the water.
- clyfe 16y agoPHP is probably not a good choice for COMET because the required open connection will block your server: http://stackoverflow.com/questions/603201/using-comet-with-php http://stackoverflow.com/questions/603201/using-comet-with-p... I guess this is the corner case one would use services like pusherapp.com PS. Don't you like services that deliberately try to hide information from you?
- Limes102 16y agoI've used PHP for Comet a couple of times and I've never had a massive problem with it. The only thing I found was that the PHP sessions tended to lock the connection, so if you tried to change page it would never load. session_close() seemed to fix this pretty well. Also, It's worth setting a time out because scripts often keep running in the background if the connection isn't closed properly.