Not sure whether or not it was PHP that was used, but some guy on NG has had server-side scripts in their Flash game before:

http://www.newgrounds.com/portal/view/213147

Perhaps you could email the author and ask how he did it?