Code: Select all
<?php
$xml = "";
$putdata = fopen( "php://input" , "rb" );
$dest_xml='/var/www/webupload/scribe'.date("H:i:s").".xml";
$file = fopen($dest_xml, "a", 0);
while(!feof( $putdata )) {
$_data = fread($putdata, 4096);
$_data = urldecode($_data);
$xml = $xml.$data;
}
$response = str_replace("response=","","$xml");
fclose($putdata);
fclose($file);
?>
this is my ouput with out the str_replace.
Code: Select all
response=<response><external-xml></external-xml><external-id>789456123</external-id><audio-duration>15</audio-duration><trans-xml><message><![CDATA[This is a test. Test 1, 2. Test 1 2 3. 1, 2, 3, 4, 5, 6, 7, 8, 9, 10. (??) here communication.]]></message><result>transcribed</result></trans-xml><metadata/><truncated>false</truncated><error-code>0</error-code><ss-id>254126455</ss-id></
any help would be very appreciated.