Detect file download completion - API/Callback/Javascript

Discussion in 'Programming' started by fly2high, Mar 23, 2011.

  1. #1
    Hello;

    I need help how to detect file download completion, if user download from certain upload hosting provider , how can it callback to my site/server; :confused:

    example if user download from rapidshare, how could it sent information (such as ip address of the downloader),/callback to my website database to match that " this user visit my website and download the file from rapidshare using link in my website ".

    It look like the user ip of download file match the user ip for visit. :)

    Thanks.
     
    fly2high, Mar 23, 2011 IP
  2. jazzcho

    jazzcho Peon

    Messages:
    326
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    To capture when the user "started" the download is trivial.
    To capture if the download has finished, now that 's not trivial at all, because you don't have any access from PHP to the web server thread that is serving he download. The only way I can think wold be to create a solution that ould involve serving the file directly through a PHP socket.
     
    jazzcho, Mar 25, 2011 IP
  3. fly2high

    fly2high Active Member

    Messages:
    273
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    75
    #3
    So how the file hosting provider, such as hotfile, filesonic detect the download completion as they say they counted complete download.
     
    fly2high, Mar 25, 2011 IP
  4. AstarothSolutions

    AstarothSolutions Peon

    Messages:
    2,680
    Likes Received:
    77
    Best Answers:
    0
    Trophy Points:
    0
    #4
    If your hosting the file you can easily detect downloads and the amount of data transfered, your challenge is that you arent hosting the files and so you will have to rely on other methods.
     
    AstarothSolutions, Mar 26, 2011 IP