<?php
header('Content-type: application/xml');
header('Content-Disposition: attachment; filename="product.xml"');
error_reporting(0);
include_once("modules/EcmProducts/xml_template.php");
$xml=xml($_REQUEST['record']);
$file="cache/upload/product_xml_".str_replace(" ","_",str_replace(".","_",microtime())).".xml";
fopen($file);
file_put_contents($file,$xml);
chmod($file,0777);
header("Location: ".$file);
?>