If one is going to write a trading system in PHP, I suggest using a brokerage with a webservice API rather than a direct FIX one.
I've written PHP trading scripts for:
Junotrade: http://www.junotrade.com/index.php/buy-stocks/web-api-documentation
TD Ameritrade:http://apiforums.tdameritrade.com/tda-board/ubbthreads.php
The trick is that you need to set up your scripts to be called in regular intervals via cron jobs (AJAX is not really the way to go as someone mentioned using)
I've written PHP trading scripts for:
Junotrade: http://www.junotrade.com/index.php/buy-stocks/web-api-documentation
TD Ameritrade:http://apiforums.tdameritrade.com/tda-board/ubbthreads.php
The trick is that you need to set up your scripts to be called in regular intervals via cron jobs (AJAX is not really the way to go as someone mentioned using)