If you need to do it 'on load basis', you can simply provide flash vars (for example put some flashvars depending on situation and embed the swf into html).
But if you need to have almost real time control over the flash, you have a few options:
- socket connections - very hard (not to say impossible) to implement with php, and a kind of complex job
- make the swf make a call to php, and get some information; then execute what you need depending on that information
I would advise you to use the second option - chose the action depending on situation, and let the swf client get it itself (either save it in file, db or calculate it realtime - it's up to you; the important is that you don't pass it to client, client makes query to get it).