I am sure there should be any way to control concurrent connections to a particular php page.Is is possible?
Any hint ..
Printable View
I am sure there should be any way to control concurrent connections to a particular php page.Is is possible?
Any hint ..
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?
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.
Why do you need to limit the number of connections? Are you doing a lot of heavy processing?
Not as such but i want to do it in that way.
The number of connections is controlled by the web server. This is not something which can be controlled using a PHP script.
I doubt if i have illustrated my problem well :confused:
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 ? :confused:
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.
:D ... Oh ok.