<?php 
if (isset($GLOBALS["HTTP_RAW_POST_DATA"])){ 
//    $xml = xmldoc($GLOBALS["HTTP_RAW_POST_DATA"]); 
    $xml = "<?xml version='1.0' encoding='UTF-8'?>" . $GLOBALS["HTTP_RAW_POST_DATA"]; 
    $file = fopen("menu.xml","w"); 
    fwrite($file, $xml); 
    fclose($file); 
//    echo("<status>File saved.</status>"); 
    echo($GLOBALS["HTTP_RAW_POST_DATA"]); 
} 
?>