Wait/Timeout
| From: | Michael | Date: | Tue, 09 Jul 2002 16:14:30 +0000 |
| Subject: | Wait/Timeout | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-106383@lists.php.net to get a copy of this message | ||
Hi!
I've been using PHP to write shell scripts and was wondering how to
implement the following:
- I have a menuing system
- If a user does not give an input within a certain amount of time, I want
it to go to a default value
I checked the PHP functions page and the closest thing I found was "sleep"
which isn't quite right. I'm sure this is a common thing, so does anyone
have any suggestions? Again, this is a terminal program and not a web CGI.
While I have your attention, I also wanted to create one of those "spinners"
while users wait for longer tasks to complete. I tried using the ncurses
stuff to print and erase characters, but it didn't seem to work. What is a
good way to create a "spinner" so that users know that the program is
working.
For those who don't know what I mean, I'm thinking of something like...
- (backspace) \ (backspace) | (backspace) / (backspace) etc. etc.
Thanks in advance!
Michael