Re: Streaming
| From: | Justin Patrin | Date: | Thu, 24 Jun 2004 21:46:36 +0000 |
| Subject: | Re: Streaming | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-189004@lists.php.net to get a copy of this message | ||
ob_end_clean() goes at the top.
flush() goes after *every* pice of info you want to show real-time.
Basically, after every echo or group of echos.
On Thu, 24 Jun 2004 16:43:39 -0500, Stephen Craton
<webmaster@melchior.us> wrote:
>
> Thanks for this, but how do I use it? Do I just put the ob_end_clean() at
> the opening the page I want to stream and then put flush() at the end?
>
> Thanks,
> Stephen Craton
> http://www.melchior.us
>
>
>
> -----Original Message-----
> From: svk [mailto:svk@ksearch.f2o.org]
> Sent: Thursday, June 24, 2004 4:25 PM
> To: php-general@lists.php.net
> Subject: Re: [PHP] Streaming
>
> On Thu, 2004-06-24 at 16:41, Stephenpp
>
> To use "streaming", you have to :
> Turn off output buffering: ob_end_clean() and flush the output has it comes
> : flush()
>
> It is useful to note that :
> "Some versions of Microsoft Internet Explorer will only start to display the
> page after they have received 256 bytes of output, so you may need to send
> extra whitespace before flushing to get those browsers to display the page.
> "
>
> and
> "Pad your output with necessary spaces, wrap your progressing data around
> open (<table>) and end (</table>) tags, and then call flush() so that one
> script will work for Netscape as well.
> "
>
> > I was browsing the net and I found a PHP chat script that claimed that
> > it does not refresh, rather it has "streaming text". This got my
> > interest and was wondering how the script did it. I downloaded it's
> > source code but couldn't find anything useful in it, very hard to read
> > in my opinion. I did a search on PHP.net for streaming but I couldn't
> > understand much of that, just my noobishness I suppose.
> >
> > How exactly would you go about streaming in PHP anyway? This has my
> > interest now...
> >
> > Thanks,
> > Stephen Craton
> > http://www.melchior.us
> > <http://www.melchior.us/>
> >
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
> !DSPAM:40db491f54512097234068!
>
>
--
paperCrane --Justin Patrin--