Ver Mensaje Individual
  #1 (permalink)  
Antiguo 13/08/2008, 21:42
develo
 
Fecha de Ingreso: octubre-2006
Mensajes: 48
Antigüedad: 17 años, 7 meses
Puntos: 0
Error : Enviar XML de Flash a PHP

saludos a todos.

Estoy proband o un ejemplo sobre enviar datos XML de Flash AS3 a php pero me ecuentro con problema en el Libro si alguien me dar una ayuda como solucionar esto en el libro miuestra codigo asi :

* Codigo recibe los datos Xml de flash y sobre escribe en archivo de texto.

<?php

$xml=$GLOBALS['$HTTP_RAW_POST_DATA'];

//procesar documento xml
$document=xmldoc($xml);

//leer elemento raiz
$rootElement=$document->root();

//leer nodo hijos <nombreuser> y <score>
$childNodes=$rootElement->children();

$data="";

// pasar en bucle por los nodos hijos y situarlos en tabla
foreach($childNodes as $childNode) {
// añadir datos a tabla;
$name=$childNode->tagName();
$value=$childNode->get_content();
$data [$name]==$value;
}


//Anexar datos a score.txt (formato:username|score)
$fp = fopen("scores.txt","a+");
$dataString= $data['nombreuser']."|".$data['score']."\n";
fputs($fp,$dataString,strlen($dataString));
fclose($fp);

?>

si lo prueban sale 2 mensajes de ERROR
quisiera saber si

Notice: Undefined index: $HTTP_RAW_POST_DATA in C:\php\servidor_web\enviarxmlserver\gamescore.php on line 3

Fatal error: Call to undefined function xmldoc() in C:\php\servidor_web\enviarxmlserver\gamescore.php on line 6

he buscado en internet que es $GLOBALS['$HTTP_RAW_POST_DATA']; pero aun no tengo ni idea como puedo solucionarlo

LES AGRADECERIA MUCHO SI ME AYUDAN EN ESTO ESTARE PENDIENDE GRACIAS