July 19th, 2000, 09:21 AM
hello to anyone,
i have a problem! we have a download-area
on our page. now, my chief, boss, sucker (whatever) wants, that a pop-up-window appears at the moment, when a client starts to download a file. and this pop-up-window should be closed, when the download is over.
the server, on which the downloadable files are sitting, is NOT the same server, which sends the response to the client!!
does anyone know, how to handle this prob?????
July 19th, 2000, 11:48 AM
July 19th, 2000, 12:11 PM
is only a little help to realize this gimmick with the pop-up-window. how can i
see, how long it the whole (it dependence from the good or less good connection of the client) download dures???????
July 19th, 2000, 02:44 PM
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">quote:</font><HR>pop-up-window[/quote]
Right there you're already away from what a server-side code can do.
That's all I'm saying
July 20th, 2000, 12:36 PM
July 20th, 2000, 01:11 PM
There's a algorythmn you can use to estimate download time, dependant on the client's speed. I'm not exactly sure how it goes, but I have a basic idea:
Try this (or variations of it locally)
<BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
$speed = 57600; // general 56k speed
$size = fsize(file name);
$time = $speed / $size;
echo "The download will take " . strftime("h:i:s",$time);
REMEMBER: I'm not sure if that strftime() function will work with those variables, so you'll have to correct the places where i've mistaken myself (my mind isn't on PHP at the moment )
To alcohol! The cause of, and solution to, all of life's problems. -- Homer Simpson
[This message has been edited by cka (edited July 20, 2000).]