I haven't ever implemented such a thing myself, but when I googled PHP long polling, this is what looked interesting to me:
http://www.nolithius.com/game-development/comet-long-polling-with-php-and-jquery
http://blog.perplexedlabs.com/2009/05/04/php-jquery-ajax-javascript-long-polling/
Maybe it can help you :).