Have you considered implementing a http service? http://www.php.net/manual/en/ref.wddx.php I believe this will relieve you of all the connection management stuff and use the apache server to handle thread management. All your clients would perform something very similar to a post with their information, and each server thread does it's insert. If you design your tables with an auto increment primary key, you should avoid problems with multiple concurrent inserts coliding on the same table. I found the following information helpful in evaluating the use of wddx; http://www.openwddx.org/faq/ Good luck, Warren Vail -----Original Message----- From: René Fournier [mailto:m5@xxxxxxxxxxxxxxxx] Sent: Friday, April 28, 2006 4:50 PM To: PHP-General; John Hicks Subject: Re: Possible? >> Anyway, I've started looking at this, but I'm not quite sure if it's >> even possible. I mean, can "something" send a request to Apache, and >> continue to write data along that TCP socket? >> Normally, HTTP requests include GET or POST for such data, but this >> is not a a web browser that's opening the connection. >> Hope I'm somewhat clear. Just struggling through some options >> here.... Anyway, thanks in advance for any suggestions. >> ...Rene > > > each client will open a persistent TCP socket connection to a common > > IP address:port (10.10.10.10:1234) > > (If you want simultaneous connections, each TCP connection will be to > a different port.) Well, not if the client (actually, it's a pre-programmed physical device) is set to always open a socket connection to 10.10.10.10:1234... right? > But rather than write a client and a server application from scratch, > why not just use HTTP POSTs? I'm not writing the client, I just need to make a server that can accept numerous simultaneous incoming socket connections, and maintain them. Maybe stream_select() as someone suggested? I suppose my question would be, can a single PHP socket server script, executed from the command-line, maintain 1000s of concurrent connections (there is not a lot of data incoming, btw)? ...Rene -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php