[SOLVED] showing progression bar
Moderator: General Moderators
-
faheemhameed
- Forum Newbie
- Posts: 5
- Joined: Thu Oct 23, 2003 1:35 am
showing progression bar
Hi there,
I wanted to send a few thousands of email to my list of contacts using php. How can I show a progression bar in the browser? I want to display approximate time to finish, how many emails to send etc.
Please shed some lights
Thanks
Hameed
I wanted to send a few thousands of email to my list of contacts using php. How can I show a progression bar in the browser? I want to display approximate time to finish, how many emails to send etc.
Please shed some lights
Thanks
Hameed
general idea is to echo js which would advance the progress bar:
Code: Select all
set_time_limit(0);
echo <<<EOF
<script language='Javascript'>
function advance() {
pg = document.getElementById('pg');
pg.style.width = (parseInt(pg.style.width)+1)+'px';
}
</script>
<div style='width:0px; height:10px; background:blue' id='pg'> </div>
EOF;
for($i = 0; $i<100; $i++) {
echo '<script language="Javascript">advance();</script>';
flush();
sleep(30);
}bluescreen
-
Hi,
I never had a bluescreen with WinXP since I tried this progress bar above.
I did change the for limit to $i<10000 and sleep(0.5).
After that my PC hang up with bluescreen
djot
PS: anyway I should have used usleep();
-
Hi,
I never had a bluescreen with WinXP since I tried this progress bar above.
I did change the for limit to $i<10000 and sleep(0.5).
After that my PC hang up with bluescreen
djot
PS: anyway I should have used usleep();
-
Last edited by djot on Sat Jul 03, 2004 11:10 am, edited 1 time in total.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Code: Select all
<?php
usleep(500000);
?>dont know why it crashes
-
The php was running on a linux server. But my pC crashed
so perhaps it was the browser.
first attemp was $i<100 and sleep(0.5), that did not crash. But $i<10000 and sleep(0.5) did.
Anyway, i just wanted to point out that I had my first blue screen.
(and i did add a PS in my previous post also)
djot
-
The php was running on a linux server. But my pC crashed
so perhaps it was the browser.
first attemp was $i<100 and sleep(0.5), that did not crash. But $i<10000 and sleep(0.5) did.
Anyway, i just wanted to point out that I had my first blue screen.
(and i did add a PS in my previous post also)
djot
-
-
faheemhameed
- Forum Newbie
- Posts: 5
- Joined: Thu Oct 23, 2003 1:35 am