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

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

Expand Messages
  • 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 1 of 2 , May 8, 2006
      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
      > 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
      bit = readBit
      updateUserDownloadStatus(userId, numberOfBit)
      print bit

      for request and verify script
      if( requestFileSize(...) != userDownloadedFileSize(...))

      Hope it will work for you....

      nhm tanveer hossain khan(hasan)
    Your message has been successfully submitted and would be delivered to recipients shortly.