|
Real-time cannot actually be done in PHP at all (in the web world). Once its done with its request and delivered its response, there is no way to reuse the data. APC and sessions can be used to "remember" things though.
Semi-real time is certainly doable. I wouldn't even recommend pulling near real time data out either, although you could pull every say 5 - 30 seconds. Chances are you are using a service for this data, and if its soap the amount of data between the requests is actually pretty low.
To refresh, PHP can push a header for a Refresh meta. That is the only way PHP can do this in a web environment reliably; used to be you could flush buffered data, but since browsers tend to buffer nowadays, that doesn't really work like it used to.
AJAX, Flash or Java are what you want to use. All of these can be timed, can communicate with PHP (or straight to originating site), and can make updates appear seamless.
|