RE: [PHP] Time Delay using phpscript

2002-06-24 Thread SP

Take a look at this page, it uses flush to stagger the results as php
processes it.  pretty cool

http://www.massassi.com/bTemplate/benchmarks/benchmark_var_assign.php?i=50



-Original Message-
From: Uma Shankari T. [mailto:[EMAIL PROTECTED]]
Sent: June 23, 2002 11:14 PM
To: PHP
Subject: [PHP] Time Delay using phpscript




Hello,

 Can anyone please clear my doubt

I need to display some strings one by one after some specific time..In
javascript we can use setTimeout() function.Is there any function like
this in phpscript ???..


Thanks  Regards
Uma


--
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




Re: [PHP] Time Delay using phpscript

2002-06-24 Thread 1LT John W. Holmes

 Take a look at this page, it uses flush to stagger the results as php
 processes it.  pretty cool

 http://www.massassi.com/bTemplate/benchmarks/benchmark_var_assign.php?i=50

I'd be interested to hear from other people if that works in other browsers.
It had a nice effect when I looked at it in IE6.

Notice that the page is plain text, though. If you start adding in tables
and what not, then it's up to the web browser to decide when to render the
page. You'll notice that the one table that's on the page renders all at
once (in IE6 at least). Depends on the application whether this is useful or
not...

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Time Delay using phpscript

2002-06-23 Thread Martin Towell

maybe

while(true)
{
  echo word;
  flush();
  sleep(1);
}

but I don't think that's exactly what you want, is it?

-Original Message-
From: Uma Shankari T. [mailto:[EMAIL PROTECTED]]
Sent: Monday, June 24, 2002 1:14 PM
To: PHP
Subject: [PHP] Time Delay using phpscript

Hello,
  
 Can anyone please clear my doubt

I need to display some strings one by one after some specific time..In
javascript we can use setTimeout() function.Is there any function like
this in phpscript ???..

Thanks  Regards
Uma


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Time Delay using phpscript

2002-06-23 Thread John Holmes

 I need to display some strings one by one after some specific time..In
 javascript we can use setTimeout() function.Is there any function like
 this in phpscript ???..

No, not really. PHP just evaluates the script and sends the output to
the browser. It has no control over the display at all. 

Best you could do is output some JavaScript along with your HTML and
attempt to control it that way. Basically, since you already know how to
do it with JavaScript, have PHP write the JavaScript for you...

---John Holmes...


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Re: [PHP] Time Delay using phpscript

2002-06-23 Thread Justin French

Why would you want to do this?  All it will achieve is delaying the output
of the entire file to the browser...

If a page would usually take .5 seconds to parse, and you have 10 seconds of
delays in the script, then the browser will get the page in around 10.5
seconds... the user will just see a delay, NOT a page with new things every
few seconds in the already-rendered page.

Once again, PHP is a SERVER SIDE language, and EVERYTHING happens before the
page is sent to the browser.   If you want stuff to happen on the CLIENT
SIDE, like displaying a new line every few seconds, then this needs to be
achieved in the BROWSER, with JavaScript or something.


If you View source on a PHP script in your browser, all you'll see is HTML
code... no PHP -- it's all parsed on the server.


Justin French



on 24/06/02 1:14 PM, Uma Shankari T. ([EMAIL PROTECTED])
wrote:

 I need to display some strings one by one after some specific time..In
 javascript we can use setTimeout() function.Is there any function like
 this in phpscript ???..


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php