Flash, XML and PHP

Hi guys, I have search through the form and didn’t get anything. Just when I thought I have found the best tutorial even for actionscript, I hit a road block. Here is what i am trying to do.

I have an external XML file (if xml file exist) if not a blank movie with an add button is show, when user clicks on add serious of input box’s and checkboxes are create to gather information and the same time in the back end an empty xml node is create. All of this is working perfectly.

Question. When user hits the submit button I want to save the information into a xml file, (data is already organized in flash as an xml object, using createElement, appendChild, etc…). I also copied the php code in the Intro to XML Flash tutorial. But in the secont line

 
<?php 
$filename = "xmltest.xml"; 
$raw_xml = file_get_contents("php://input"); 
  
print $raw_xml; 
  
$fp = fopen($filename, "w"); 
fwrite($fp, $raw_xml); 
fclose($fp); 
?> 

$raw_xml … what goes in "php://input section. here is that my flash AS code looks like

 
submitRoster = new Object();
   submitRoster.click = function(eventObj)
   {
	roster.send("rosterSave.php", roster);
   }
   
   submit.addEventListener("click",submitRoster);

roster is my xml object, ready to be saved in a xml file. Any one have a working example of php or asp code that takes an xml object from flash and saves it to an xml file? I tried google but no luck, I got frustrate.