title: PHP server and websockets
body: <p>I want to start using websockets to make a connection to a PHP socket server. This server should check at a certain interval if something has changed in the database and it should then send the changes back to the client. So when a client is connected, the connection should remain open aslong as the client (the webbrowser in this case) is on the page.</p>
  
  <p>Then the server should check at a certain interval the database and send data back when needed. I know that the problem isn't the websockets (except that not all major browsers support it yet). Mainly my concern is PHP. I want to create the server in PHP, but can i keep a connection open to a PHP code for aslong as i want?</p>
  
  <p>And how about the interval. Normally in a C#.NET exe application i would just create a timer.  How could this be done in PHP??</p>
  
  <p>If this is all possible, can i just simply run my PHP code in an Apache webserver?</p>