flash:

Код:
var xml=new XML ();
var root=xml.createElement ("request");
root.attributes.test1="here some data";
root.attributes.test2="here some data";
xml.appendChild (root);
xml.sendAndLoad ("http://localhost/receiver.php",xml);
xml.onLoad = function (success){
if (success){
trace ("Передача удалась");
trace ("От сервера пришел ответ: "+xml.firstChild.attributes.test);
} else {
trace ("Что-то передача не удалась");
}
}
php:

Код:
<?
header('Content-Type: text/xml');
$xml = stripslashes(file_get_contents('php://input')); //загружаем посланые клиентом данные в переменную
$doc = new DOMDocument(); //парсим
$doc->loadXML($xml);
$root = $doc->getElementsByTagName('request')->item(0);
file_put_contents("testfile","test1=".$root->getAttribute('test1')." test2=".$root->getAttribute('test1')."\n",FILE_APPEND);
echo iconv ("windows-1251","UTF-8","<response test='передача-то удалась!' />"); //долбаный флеш понимает только utf
?>