I am working on a project and I am constantly pinging a php script for new data, so if I understand this correctly, this means that the PHP ping script runs indefinitely. This works, but I assume this is a huge voltage on the server, and is probably considered ugly and bad practice. Am I right about that?
Is it possible to keep the connection alive with the script and use the php built into the output buffering to clear the content I need, but keep the script working for infinity using some kind of loop, so when new data is available, it can be output. Is this a bad idea?
I'm just looking for input form developers there with a lot of experience.
The last thing ...
Are there other ways to maintain a constant stream of data (excluding technologies such as flash or silverlight)?
source
share