Simple websockets implementation in PHP