Results 1 to 6 of 6

Thread: downloading to client side

  1. #1
    Join Date
    Dec 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry downloading to client side

    hi all

    How can we know whether a file finished downloading or not in the client side using php.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    PHP is a serverside language... you can't tell what's going on with the user.
    Serverside you could check when the file is done being served, but that isn't a guarantee it got there.
    Using a Java applet you could check this, as well as with ActiveX, and they could run AJAX to the php if need be.

    What's the situation?
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Dec 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Angry

    I want to download a file from the server,while downloading a file from the server,if i am again going to click on the same download link,the download must not happen and I want to show the message as u are downloading the file so please wait to finish for downloading this file.How can I eanble this technique?


    Please give me a suggestion

  4. #4
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    That's illogical.
    If the download automatically crashes, it will never be "complete" and they will end up just not getting the file, ever.

    Instead, what you need is some complex server side scripting that only allows the transfer of a single file once at one time, so that you cannot download a large file twice at the same time.

    No idea here.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  5. #5
    Join Date
    Dec 2006
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy

    please try the below link

    http://rapidshare.com/files/1921716/1580531598.rar

    first time it will download the file.if u are trying again and agin you will get the message as


    Your IP is downloading a file so please wait

    How can i achieve this

  6. #6
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    You could use IP tracking. Simply take the user's IP address by using $_SERVER["REMOTE_ADDR"]; and log that into either a text file or database. Then do what djr33 suggested about using AJAX to let you know when the download is complete. As far as doing that, not a clue. But to get the info about if the user is downloading a file and tries to download again, use $_SERVER["REMOTE_ADDR"]. Hope this kinda points you in the right direction.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •