Is a server, written in PHP using sockets, possible to support multiples simultaneous conections?? For example on POrt 60001;
if it is, how can it be done??
It depends on how you want to do it. Do you want to have one PHP script running forever, accepting connections. Or are you on un*x and do you want to use the inetd to start a phpscript whenever a connection request comes in?
Thanks for your help. If you don`t mind, I would apreciate if you could send me both solutions. Even that I think the second one much more appealing.
Thank again German
I think the second one much more appealing
Good, because the first one is not possible: php has no access to fork() or to threads.
Kirk, PHP doesn't support threads, but it does support objects and ticks, which can be used to simulate threads. And fork() is can be replaced by exec().