TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: What's the best way to do COMET in PHP?

5 pointsby ciocabout 14 years ago
What technologies would you use to create a COMET application, that scales well, in PHP?

2 comments

clyfeabout 14 years ago
PHP is probably not a good choice for COMET because the required open connection will block your server:<p><a href="http://stackoverflow.com/questions/603201/using-comet-with-php" rel="nofollow">http://stackoverflow.com/questions/603201/using-comet-with-p...</a><p>I guess this is the corner case one would use services like pusherapp.com<p>PS. Don't you like services that deliberately try to hide information from you?
Limes102about 14 years ago
I've used PHP for Comet a couple of times and I've never had a massive problem with it.<p>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.<p>Also, It's worth setting a time out because scripts often keep running in the background if the connection isn't closed properly.