help in implementing a progress bar

help in implementing a progress bar

am 07.01.2010 21:36:38 von Vinay Kannan

--0016e64b96e22ac2f2047c990725
Content-Type: text/plain; charset=ISO-8859-1

Hello,

Theres this project that I am working on, and a specific module does take
few secs to process, I am thinking it would be cool to be showing a progress
bar(some kind on a .gif image) while the script runs, does any one have an
idea how to implement this?

Thanks,
Vinay K

--0016e64b96e22ac2f2047c990725--

Re: help in implementing a progress bar

am 11.01.2010 16:17:05 von Philip Thompson

On Jan 7, 2010, at 2:36 PM, Vinay Kannan wrote:

> Hello,
>=20
> Theres this project that I am working on, and a specific module does =
take
> few secs to process, I am thinking it would be cool to be showing a =
progress
> bar(some kind on a .gif image) while the script runs, does any one =
have an
> idea how to implement this?
>=20
> Thanks,
> Vinay K

This isn't really database related, but ok...

// Progress.php
class Progress {
public function start () {
echo file_get_contents ('progress.html');
flush ();
}
public function end ($url) {
$text =3D "";
=20
echo $text;
flush ();
}
}
?>

// process.php - process the stuff
$progress =3D new Progress();
$progress->start();
// ... Do your processing here ...
$progress->end('nextpage.php');
?>

In the progress.html file, it would just be an html page that has an =
animated gif (and whatever else you want on it). Hope this helps.

~Philip=

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