PHP - file loading bar

I created this website for a client that users can open a power point presentation file but the files are like from 20 MB to 60 MB. it takes a looooooong time to load. people may even think the PC is frozen. how can i create a File Loading Progress Bar so users wont get that impatient?

I know I can use an animated GIF or like a Flash file. But how can I get how much of the power point presentation file has been downloaded? For programming I usually use PHP, but im kinda intermediate.

Thanks in advance,

Leo:huh:

Nearly impossible - there are some dirty tricks, but i’ve never seen any of them work like it should.

The one I use is fairly simple (at least for recurring customers), and more importantly, doesn’t slow down the the download speed:
Step 1: calculate the size of the file.
Step 2: create a log (txt, mySQL, doesn’t matter) to store the averages (from any customer)
Step 3: when a user finishes downloading, place the speed/time in a cookie.

Now you can easely calculate the time & speed. If the user doesn’t have any stored avarage, you can use the average from your log.

If you need any help with this, let me know.

i don’t know for sure and i’m no AJAX expert, but you might be able to find one using AJAX and PHP. http://www.google.com/search?q=ajax+upload+progress

Cant do it, Like when you start your windows, it only has the bar going it doesnt show progress. As far as i know cant do it.

Ajax methods are only usefull if you’re planning to use the whole package extensivly - otherwise it consumes too much recources (bw, cpu, …)

Good luck anyways!