I'm sending XML data from jQuery by Ajax to first PHP script. It works fine.
jQuery - Ajax
open('POST', 'get_and_send_XML.php', { xml: newXmlString1 }, '_blank');
get_and_send_XML.php
$data = $_POST['xml'];
$fh = fopen('first.txt', 'w') or die("Can't create file");
fwrite($fh, $data);
fclose($fh);
curl_setopt($ch, CURLOPT_URL,"http://domain.com/second.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, "xml=". $data );
second.php
$data = $_POST['xml'];
$fh = fopen('second.txt', 'w') or die("Can't create file");
fwrite($fh, $data);
fclose($fh);
But then I need send this XML data from this first PHP script, to another second PHP script by cURL. But in the second PHP script XML data don't look the same. Html chats are changed.
How to solve this problem ?