#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    munich,bavarian,germany
    Posts
    3
    Rep Power
    0
    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?????

    many greetings
    stumy
  2. #2
  3. No Profile Picture
    ledjon
    Guest
    Devshed Newbie (0 - 499 posts)
    You're in the wrong forum for that. That's all JavaScript/Client Side. PHP is server side.

    I don't know any JavaScript, so I can't help.
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    munich,bavarian,germany
    Posts
    3
    Rep Power
    0
    you don't understand me .... i'm talking about server side programming! javascript
    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???????
    this has nothing to do with javascript!
    regard
    hans
  6. #4
  7. No Profile Picture
    ledjon
    Guest
    Devshed Newbie (0 - 499 posts)
    <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
  8. #5
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    45
    Rep Power
    15
    This really is more a javascript question. Although I see what you mean, Javascript is more built for this than PHP. What you should do is write a timer in Javascript that starts with the page loading, using the onLoad function, and ends with the offLoad function. I don't know exactly how you can determine when the download is actually done - that's a problem I have no clue to. But PHP isn't suited for this problem - it's timer related and more client-side.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Location
    Ontario, Canada
    Posts
    498
    Rep Power
    18
    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);
    [/code]

    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).]

Similar Threads

  1. adjusting time duration from a drop down menu
    By spyghost in forum HTML Programming
    Replies: 9
    Last Post: March 1st, 2004, 03:05 AM
  2. Download WAV files without timedelay ?
    By BlackSheep in forum PHP Development
    Replies: 9
    Last Post: February 24th, 2004, 05:58 PM
  3. Download Problems in IE
    By mrsarun in forum Windows Help
    Replies: 3
    Last Post: February 18th, 2004, 04:41 AM
  4. time in - time out
    By newbiex in forum PHP Development
    Replies: 2
    Last Post: February 9th, 2004, 03:04 AM
  5. Adding minutes to time and other calcs
    By Jez433 in forum PHP Development
    Replies: 5
    Last Post: January 21st, 2004, 07:00 PM

IMN logo majestic logo threadwatch logo seochat tools logo