How can I make the script read an xml file from an url and convert it to a CSV and leave it in the server, not download it ?
<?php require_once('XmlToCsv.class.php'); // Example 1 $x = new XmlToCsv(); $csvString = $x->url('http://www.mysite.com/example.xml')->autoConvert(); file_put_contents("my_csv_file.csv",$csvString); // Example 2 ob_start(); XmlToCsv::convert('http://www.mysite.com/example.xml'); file_put_contents("my_csv_file.csv",ob_get_clean()); ?>