Previous page magic xml saving

So…ok…Lets try this.

I’ve altered the example xml guestbook that can be found somewhere on this site. I have a swf/flash file that allows me to enter in info about a video and then it’s does a “sendandload” function call in actionscript to a php file called processXML.php. This takes my little info and adds it to a pervious list of videos.

So, it works fine if both are in the same directory. I want to have the flash file to be embed into various other directories and then use the same php code to write to the different directories.

I want the php code to grab what page is calling it and then place the xml into the pages directory. So anythoughts?

What bit of code can pick out the “previous page” or the page thats hosting the flash?

I don’t want to put duplicate code into each directory.

on the page that the flash is embeded within, you can use flashVars to pass the value of the directory to the swf