FlashVars - send a variable value from swf to PHP

[FONT=Calibri][SIZE=3]I’d like to be able to generate certain data XML file through PHP based on variable that embedded in html page swf sends or request. I heard that it can be achieved by assigning FlashVars. I created a flash gallery which loads all content based on data from XML. However, I need to load a different content using the same flash gallery based in which html page the swf(gallery) is embedded. I can generate new XML through PHP if swf will send a variable to PHP which can be read as unique. I need to create a mechanism where the embedded swf send this unique variable. [/SIZE][/FONT]
[FONT=Calibri][SIZE=3]I am looking for any leads on how to achieve it. Any advice or pointers to existing examples are highly appreciated. It is something should be easy but I am stuck making it happen in AS 3.0.[/SIZE][/FONT]
[FONT=Calibri][SIZE=3]Thank you in advance.[/SIZE][/FONT]