|
-
Feb 16th, 2006, 12:58 AM
#1
Thread Starter
Addicted Member
Controlled connections
I am sure there should be any way to control concurrent connections to a particular php page.Is is possible?
Any hint ..
-
Feb 16th, 2006, 04:06 AM
#2
Re: Controlled connections
The web server is the process which deals with concurrent connections; not the PHP script.
PHP does have the ability to use Shared Memory and as long as you do not lock the file, two users running the same script simultaniously can update the same file.
What exactly do you want to do?
-
Feb 16th, 2006, 08:13 AM
#3
Thread Starter
Addicted Member
Re: Controlled connections
I have share hosting account and no budget for next jump VPS but it's quite possible that most visitors at a time wants to run php page.And it would be headache for my web host.So i want to limit only 10 or 20 visitors to access the page at a time otherwise they will be asked for wait.
-
Feb 16th, 2006, 08:50 AM
#4
<?="Moderator"?>
Re: Controlled connections
Why do you need to limit the number of connections? Are you doing a lot of heavy processing?
-
Feb 16th, 2006, 04:08 PM
#5
Thread Starter
Addicted Member
Re: Controlled connections
Not as such but i want to do it in that way.
-
Feb 17th, 2006, 01:03 AM
#6
Re: Controlled connections
The number of connections is controlled by the web server. This is not something which can be controlled using a PHP script.
-
Feb 17th, 2006, 03:32 AM
#7
Thread Starter
Addicted Member
Re: Controlled connections
I doubt if i have illustrated my problem well 
I want that at same time there should be not more than 10 visitors using the same php page (script).I want to do it so that at a time only 10 scripts should run and there should be less overheads to run it and others will wait.
I have illustrated my problem .. RIght ?
-
Feb 17th, 2006, 07:10 AM
#8
Re: Controlled connections
Right - except that, unless your script is pretty complicated, the overhead of tracking the amount of connections safely is likely to be higher than whatever processing you do.
All the buzzt
 CornedBee
"Writing specifications is like writing a novel. Writing code is like writing poetry."
- Anonymous, published by Raymond Chen
Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.
-
Feb 17th, 2006, 07:59 AM
#9
Thread Starter
Addicted Member
Re: Controlled connections
... Oh ok.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|