ultraPHPnoob Posted August 21, 2010 Share Posted August 21, 2010 I don't know if this is the right sub forum, but here's the question anyway: When you run a PHP board that's based on a PHP session ID for each user, is it possible to edit the php.ini or any other file to restrict the amount of simultaneous downloads for each user/session? I can see in PHP.ini that there are restrictions for uploads, but NOT downloads. I'm running a board with lots of attachments on it, and the users are taking too much bandwidth these days. And my PHP board doesn't support any download restrictions either. There's no plugins for this, so I was hoping for some guidance here. I thank you all in advance for any help! Quote Link to comment https://forums.phpfreaks.com/topic/211354-help-with-sessionid-and-download-limits/ Share on other sites More sharing options...
trq Posted August 21, 2010 Share Posted August 21, 2010 There should be ways of handling this through server configurations, are you using Apache? Quote Link to comment https://forums.phpfreaks.com/topic/211354-help-with-sessionid-and-download-limits/#findComment-1102024 Share on other sites More sharing options...
ultraPHPnoob Posted August 22, 2010 Author Share Posted August 22, 2010 Hi, thanks for answering! Yeah, this is a LAMP server. Quote Link to comment https://forums.phpfreaks.com/topic/211354-help-with-sessionid-and-download-limits/#findComment-1102313 Share on other sites More sharing options...
jeff5656 Posted August 22, 2010 Share Posted August 22, 2010 Why not add a field to the user table called dl-limit and whenever they download a file increase the counter. Then check this (with the session_id) before proceedign with the download. When they log off, reset the dl field to 0 again. Quote Link to comment https://forums.phpfreaks.com/topic/211354-help-with-sessionid-and-download-limits/#findComment-1102343 Share on other sites More sharing options...
freelance84 Posted August 22, 2010 Share Posted August 22, 2010 I'm sure the default is 2 and set in by the browser Quote Link to comment https://forums.phpfreaks.com/topic/211354-help-with-sessionid-and-download-limits/#findComment-1102349 Share on other sites More sharing options...
ultraPHPnoob Posted September 3, 2010 Author Share Posted September 3, 2010 Why not add a field to the user table called dl-limit and whenever they download a file increase the counter. Then check this (with the session_id) before proceedign with the download. When they log off, reset the dl field to 0 again. That sounded like a good idea! But I would need some help to setup something like that though. I'm not sure what you're talking about here on a technical level. Quote Link to comment https://forums.phpfreaks.com/topic/211354-help-with-sessionid-and-download-limits/#findComment-1106829 Share on other sites More sharing options...
ultraPHPnoob Posted September 3, 2010 Author Share Posted September 3, 2010 I'm sure the default is 2 and set in by the browser Are you sure about that? Because I can download like hundreds of downloads simultaneously in Firefox. Quote Link to comment https://forums.phpfreaks.com/topic/211354-help-with-sessionid-and-download-limits/#findComment-1106830 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.