Re: output buffer with Chrome issue.
| From: | Robert Cummings | Date: | Fri, 01 May 2009 14:55:08 +0000 |
| Subject: | Re: output buffer with Chrome issue. | ||
| References: | 1 2 3 4 5 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-292191@lists.php.net to get a copy of this message | ||
On Fri, 2009-05-01 at 10:42 -0400, Dan Joseph wrote:
> On Fri, May 1, 2009 at 10:40 AM, Robert Cummings <robert@interjinn.com>wrote:
>
> > On Fri, 2009-05-01 at 10:34 -0400, Dan Joseph wrote:
> > >
> > > Ajax unfortunately isn't an option in this particular case.
> >
> > Why? Maybe you're thinking about it wrong.
> >
> >
> Maybe, I'm open to suggestions:
>
> Here's the basic way the application works. main index renders, javascript
> runs to create an iframe, and set the src='phpfile.php' that runs in a
> continuous loop. it connects to the server, and then listens for output.
>
> Disconnecting from the server isn't an option at all, or else the
> application will not function properly. It needs to have the constant
> "stream" to the server.
>
> Is there a better solution for this?
I presume your backend script is running something that passes the data
to the browser un-interrupted... maybe a shell script? You can wrap this
in popen() or proc_open() and read the output as you would a file. This
can then be queued for consumption by an AJAX script.
Cheers,
Rob.
--
http://www.interjinn.com
Application and Templating Framework for PHP