Current location: Hot Scripts Forums » Programming Languages » PHP » max connection


max connection

Reply
  #1 (permalink)  
Old 02-27-06, 08:23 AM
free_dragon free_dragon is offline
New Member
 
Join Date: Feb 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Question max connection

Hello

i want to set a max users can download from my server in one time
i mean i want to get something to limit the connections on the server to 50 users in the same time can visit or download from my sevrer and if more come then redirect them to any page.
is thier a way to do this by htaccess or anything?
Thanks ...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 02-27-06, 10:28 AM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
but how are you going to know when a visitor finish downloading a file? depending on the file size it might vary from 1 minute to 4 hours!
detecting that is not easy, if possible at all! it has been discussed many times here, but always with the same results!
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 02-27-06, 01:38 PM
mab's Avatar
mab mab is offline
Community VIP
 
Join Date: Oct 2005
Location: Denver, Co. USA
Posts: 2,674
Thanks: 0
Thanked 0 Times in 0 Posts
This is a server function/setting. You mention "my server." If you own this server, you will be able to change this setting.

If you are on Windows/IIS - http://www.microsoft.com/technet/pro...9583b6700.mspx

For Apache, I believe this is the setting - http://httpd.apache.org/docs/1.3/mod...tml#maxclients
I don't know if you can do this per-site using htaccess...
__________________
Error checking, error reporting, and error recovery. If your code does not have these to get it to tell you why it is not working, what makes you think someone in a programming forum will be able to tell you why it is not working???
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #4 (permalink)  
Old 02-27-06, 03:06 PM
KeYBLeR KeYBLeR is offline
Newbie Coder
 
Join Date: Jan 2006
Posts: 96
Thanks: 0
Thanked 0 Times in 0 Posts
you should set your limit to 5 people at a time, to increase download speed...send the other people to a waiting room, until a spot opens up...

You could have ads, make some $$$... and have memberships, To give people front of the line access.. Make even more $$$

Good luck
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #5 (permalink)  
Old 02-27-06, 03:24 PM
NeverMind's Avatar
NeverMind NeverMind is offline
Community VIP
 
Join Date: Aug 2003
Location: K.S.A
Posts: 2,257
Thanks: 0
Thanked 2 Times in 1 Post
Quote:
Originally Posted by mab
This is a server function/setting. You mention "my server." If you own this server, you will be able to change this setting.

If you are on Windows/IIS - http://www.microsoft.com/technet/pro...9583b6700.mspx

For Apache, I believe this is the setting - http://httpd.apache.org/docs/1.3/mod...tml#maxclients
I don't know if you can do this per-site using htaccess...
Great find, mab!
__________________
PHPSimplicity
We don't need a reason to help people - Zidane [FF9]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #6 (permalink)  
Old 03-01-06, 04:11 AM
4saken 4saken is offline
Newbie Coder
 
Join Date: Apr 2005
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
You better try mod_cband module for Apache.

Here is a quotation:
mod_cband is an Apache 2 module provided to solve the problem of limiting users' and virtualhosts' bandwidth usage. The current versions can set virtualhosts' and users' bandwidth quotas, maximal download speed (like in mod_bandwidth), requests-per-second speed and the maximal number of simultanous IP connections (like in mod_limitipconn)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make max connection limit per ip using php? Osjur PHP 7 04-01-06 01:32 AM
Xtreme-Webhost®Up to 2GB Free Web Hosting Jason7fd General Advertisements 0 12-06-05 10:37 AM
ASP syntax error stuckonaproject ASP 8 12-14-04 11:30 AM
Closing a MySQL connection surebetdmg PHP 5 08-15-03 09:37 AM


All times are GMT -5. The time now is 11:55 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.