in reply to Sockets
BTW, since you are doing only the server side, why do you implement a client side as well?
Two other small comments: 1. You don't need the $line="" 2. You can remove the 'defined'