headcutter Posted September 25, 2006 Share Posted September 25, 2006 For bandwidth reasons I want to limit people on my website to download let's say 10,000 mp3's per month since I don't want mp's transfers to consume my bandwidth. I am sure there is a way to do it, but I am quite lost. Are there any scripts which are available for the pubic that would do so? Any help will be appreciated. Quote Link to comment Share on other sites More sharing options...
HuggieBear Posted September 25, 2006 Share Posted September 25, 2006 Why not have a counter running, and just use a conditional statement to tell if the mp3's should be displayed or not.[code=php:0]$sql = "SELECT max, count FROM downloads";$query = mysql_query($sql);$result = mysql_fetch_row($query);if ($result['count'] >= $result['max']){ echo "Sorry, reached maximum number of downloads this month\n";}else { //echo your page contents here}[/code]This is just thrown together, but should gie you an idea.RegardsHuggie Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.