PhpSocketExample is a project mainly written in PHP, it's free.
A simple php socket server that listen at a especified address + port