Slowing a script

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Poomerio
Forum Newbie
Posts: 18
Joined: Tue Sep 04, 2007 4:38 am
Location: SE England

Slowing a script

Post by Poomerio »

Hi.

Would it be possible for me to achieve this effect:

The script echos a string of text, and then a few seconds later, echos some more.

Thanks,
- Poomie
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Post by Zoxive »

sleep(), or maybe even JavaScript?
Poomerio
Forum Newbie
Posts: 18
Joined: Tue Sep 04, 2007 4:38 am
Location: SE England

Post by Poomerio »

Well how would I do it, using either of these?

- Poomie
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Your choice, however Javascript can be disabled by a user.
Poomerio
Forum Newbie
Posts: 18
Joined: Tue Sep 04, 2007 4:38 am
Location: SE England

Post by Poomerio »

Well if I was to use the sleep() function, wouldn't that just delay the execution of the whole script?

- Poomie
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Post by Zoxive »

Poomerio wrote:Well if I was to use the sleep() function, wouldn't that just delay the execution of the whole script?

- Poomie
Have you tried it? Or read the manual link i posted?

This is why i said both, Sleep, or javascript (setTimeout).
Poomerio
Forum Newbie
Posts: 18
Joined: Tue Sep 04, 2007 4:38 am
Location: SE England

Post by Poomerio »

Yes I have tried it, and yes I've also read the Manual (many a time before)

- Poomie
User avatar
Zoxive
Forum Regular
Posts: 974
Joined: Fri Apr 01, 2005 4:37 pm
Location: Bay City, Michigan

Post by Zoxive »

Poomerio wrote:Yes I have tried it, and yes I've also read the Manual (many a time before)

- Poomie
So you answered your own question then?
Poomerio
Forum Newbie
Posts: 18
Joined: Tue Sep 04, 2007 4:38 am
Location: SE England

Post by Poomerio »

Not really.
But how could this be achieved n Javascript then?

- Poomie
Post Reply