Bottom line is that you can't do it reliably with PHP or anything on
the server. Different browsers will display content at different times.
I think Internet Explorer will only display something after it gets a
certain amount of information (i.e. 18k) or the entire page. I don't
think any
How do I make the browser to display data as it being generated? I've
noticed some websites do this with cgi.
For example:
html
head
titleXXX/title
/head
body
%
$i = 0;
while (true){
echo p . $i++ . /p;
sleep(1);
}
%
/body
/html
This scripts does not work: It only shows 0,1,2,3[29] when
On Sunday 08 May 2005 22:17, Kirsten wrote:
I think you need to use ob_start first, then ob_flush on each update
Haven't tested it, but I think it's like this:
Note: I recommend using ?php ? instead of % % (this is because not every
php server will recognize the asp style tags.
html
head
http://au.php.net/flush
Kirsten wrote:
How do I make the browser to display data as it being generated? I've
noticed some websites do this with cgi.
For example:
html
head
titleXXX/title
/head
body
%
$i = 0;
while (true){
echo p . $i++ . /p;
sleep(1);
}
%
/body
/html
Hello Kirsten,
Sunday, May 8, 2005, 9:17:22 PM, you wrote:
K How do I make the browser to display data as it being generated? I've
K noticed some websites do this with cgi.
You need to use output buffering, have a look at the OB functions in
the PHP manual to get you started.
Best regards,
On , 2005-05-08 at 17:17 -0300, Kirsten wrote:
This scripts does not work: It only shows 0,1,2,3[29] when the timeout
limit is reached.
Any ideas?
Yes, take a look at the AJAX method. For a beginning, the following link
http://www.adaptivepath.com/publications/essays/archives/000385.php
either follow each echo call with a flush() function call, or enable
the implicit_flush in php.ini, or ini_set().
I don't think output buffering as described in the php docs is
particularly relevent in this case.
Bare in mind that some browsers don't display data either until they
have received
On Sun, May 8, 2005 6:02 pm, Rory Browne said:
Bare in mind that some browsers don't display data either until they
have received a certain amount, or have closed the connection AFAIK.
Actually...
First, the web server may well have some kind of buffering going on,
though current Apache/PHP
8 matches
Mail list logo