Loading ...
Sorry, an error occurred while loading the content.

tracking the downloading bytes from server (need a early hand)

Expand Messages
  • murshed khan
    Hello everyone, Hope that days gonna fine....... My goals: 1. suppose there is a download link in my site
    Message 1 of 2 , May 7, 2006
    • 0 Attachment
      Hello everyone,
       
      Hope that days gonna fine.......
       
      My goals:
       
      1. suppose there is  a download link in my site  
      simply:
       
      2.anyone can download this file by clicking  the link, whenever anyone click the link download starts and will take time to finish depending on the size of the file.
       
      3.Now i want to track from server side script or any other means that how much bytes is transferred.
       
       
      after one successful download i have to remove the link from my site .... removing the link is pretty easy but the problem is how can i know that this file is successfully downloaded to the pc once.
      Can i track how many bytes is downloaded from server?
      his/her download might be interrupted by a disconnection, then it would not be a successfull download.
      after one 100% download i have to set a flag=1 to remove the link dynamically.
      Is there any means to identify such a 100% successful download.
       
      i thought some means and test also ..... but nothing are full proof ....
       
      Now brilliant guys just share your ways to make happen this works fine.
      I m looking forward for your suggestions....................ASAP
       
      Regards
      Murshed Ahmmad Khan
       
       
       


      New Yahoo! Messenger with Voice. Call regular phones from your PC and save big.
    • jphp0xhasan
      Read inline Comments... ... anyone click the link download starts and will take time to finish depending on the size of the file. ... that how much bytes is
      Message 2 of 2 , May 8, 2006
      • 0 Attachment
        Read inline Comments...

        > Hope that days gonna fine.......
        >
        > My goals:
        >
        > 1. suppose there is a download link in my site
        > http://www.mydomainname.com/item/id=robot&file=sharadin.mp3 or
        > simply:
        > http://www.mydomainname.com/item/sharadin.mp3
        >
        > 2.anyone can download this file by clicking the link, whenever
        anyone click the link download starts and will take time to finish
        depending on the size of the file.
        >
        > 3.Now i want to track from server side script or any other means
        that how much bytes is transferred.
        >
        >
        > after one successful download i have to remove the link from my
        site .... removing the link is pretty easy but the problem is how can
        i know that this file is successfully downloaded to the pc once.
        > Can i track how many bytes is downloaded from server?

        ---> It is possible as far i can think, i will dicuess this issue in
        later question...

        > his/her download might be interrupted by a disconnection, then it
        would not be a successfull download.
        > after one 100% download i have to set a flag=1 to remove the link
        dynamically.
        > Is there any means to identify such a 100% successful download.
        >

        ---> Some way it should be possible like if you handle your download
        using PHP Script... where your PHP script open requested file and
        transfer bit by bit... and your script updates a static counter in
        your shared memory or any physical file...

        Client end responsive UI will fetch that counter value after reloading
        contents... (it might be using Ajax)

        ** How to ensure successful download:
        If you handle your download using your own script... you know when a
        download should be successful...
        here is some logic...

        for download script
        --------------------
        while(notEOF)
        bit = readBit
        numberOfBit++
        updateUserDownloadStatus(userId, numberOfBit)
        print bit
        end

        for request and verify script
        -------------------------------
        if( requestFileSize(...) != userDownloadedFileSize(...))
        canDownloadAgain();
        else
        cantDownloadTwice();


        Hope it will work for you....


        regards
        nhm tanveer hossain khan(hasan)
        http://hasan.we4tech.com
        http://www.somewherein.net
        http://www.somewherein.net/blog
      Your message has been successfully submitted and would be delivered to recipients shortly.