title: Persistent PHP socket server
body: <p>I'm planning the development of a server written in PHP that can service socket requests. I use a free host (Heliohost) for testing, and it has cPanel. So far the only thing I've been able to think of to have a PHP script always running is to write a cron job that runs a bash script to check <code>ps</code> to see if the PHP is already running, and if it isn't, start it.</p>
  
  <p>Is there a better way? Perhaps a way for a PHP thread to be started on an HTTP request and continue to run in Apache after the request has been serviced?</p>