Rex,
I've never actually used PHP for this type of thing ... but you might want to start by looking here:
http://fisheye.freeswitch.org/browse/FreeSWITCH/libs/esl/php/single_command.php?r=12216
or
http://wiki.freeswitch.org/wiki/PHP_Event_Socket
Good luck. I'm sure some other folks here who use PHP for this type of app will be able to assist more.
SDR