PHP: simple socket library