0

I have a website which has multiple downloadable videos, Im after a way of limiting the amount of files any user can download at any one time, Currently all users can download all files at once, which is killing speed!

So need to limit to say x2 downloads at once! Is this done in the .htaccess or via php

Thanks

  • 1
    Take a look [here](http://stackoverflow.com/questions/4002106/limit-download-speed-using-php) at restricting speed, as opposed to restricting the amount of files downloaded simultaneously. – KyleHodgetts Dec 09 '14 at 13:53
  • UPDATE! I have added the MOD_BW to the apache server and yet to configure it , trying to find some help to do so – Morby-Raybould Dec 10 '14 at 19:19

1 Answers1

-2

In your download php script make a entry in database table when user hit download process. As a number of count download hide download button.

vijay
  • 731
  • 5
  • 15
  • 1
    and if the user aborts the download(s) by closing the browser? – MonkeyZeus Dec 09 '14 at 13:58
  • 1
    He wants to limit the number of simultaneous downloads, not the total amount of downloads. – Jerodev Dec 09 '14 at 13:59
  • have not possible that track to cancel download. – vijay Dec 09 '14 at 14:03
  • Because if user hit download and cancel it after few minutes then it is not possible to track whole download process. You just do to track when user start download successfully . – vijay Dec 09 '14 at 14:04
  • And for limit speed you can visit following link http://www.jonasjohn.de/snippets/php/dl-speed-limit.htm – vijay Dec 09 '14 at 14:07
  • Yes i want to limit simultaneous D/L's as its killing bandwidth and slowing the server down with so many connections. – Morby-Raybould Dec 09 '14 at 15:47