xmlrpc php record xml to text file

Taex

New Member
I am getting xmlrpc xml posted to my server and I want to catch the xml and store it in a text file for later processing.This is what I have, but I just get a blank text file\[code\]$getXML = file_get_contents('php://input'); $xml = new SimpleXMLElement($getXML); $text = $xml->Text; $today = date("Y-m-d"); $randomnr = rand(100000, 999999); $datet = date("Ymd-H:i:s"); $filename = "/var/www/".$datet."-".$randomnr.".txt"; $fh = fopen($filename, 'w') or die("can't open file"); fwrite($fh, $text); fclose($fh);\[/code\]Can anyone see why I cam getting a blank text file?
 
Back
Top