Note: Rebuild PHP with the configure option --enable-sockets Download the sample script here (use it at your own risk!).