You don't need PHP. Swfobject has a built in method called getQueryParamVal
http://clipboard.com/clip/LQXr7IQ1Zg...bsa1ydPdva3due
http://code.google.com/p/swfobject/wiki/api