Kurinchi Blogger Scribbles …


Archive for October 5th, 2009

Oct 05
2009

PHP: How to receive the posted XML data?

Last updated: October 5th, 2009

Receive the posted XML data

In order to test the posted data, we can create a file creation steps to ensure that we receive the posted data via the $_POST array

<?php
/*
  File name: postdata2.php
*/
    $xmlFile = "xmlFile.txt";
    $fh = fopen($xmlFile, 'w') or die("Cannot open file");
    fwrite($fh, $_POST["xmldata"]);
    fclose($fh);

?>

Valid HTML 4.01 Strict  Valid HTML 4.01 Strict