0 && strlen($csvfile) > 0 && strpos(strtolower($csvfile) . "~", ".csv~") !== false) { $csv_file_content=str_replace('~','"',str_replace("[","",str_replace("]","",str_replace(", [","\n",str_replace(",[","\n",urldecode($csvprefix . $datais)))))); if (strpos($csv_file_content," ") === false) $csv_file_content=str_replace("'","",$csv_file_content); if (1 == 2) file_put_contents($csvfile0, $csv_file_content); // Thanks to http://stackoverflow.com/questions/4348802/how-can-i-output-a-utf-8-csv-in-php-that-excel-will-read-properly if (strlen($csv_file_content) > 0) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); $hdr='Content-Disposition: attachment; filename=' . $csvfile; header($hdr); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); echo "\xEF\xBB\xBF"; // UTF-8 BOM echo $csv_file_content; exit(); } } $csvfile0=""; if (isset($_GET['csv0'])) $csvfile0=$_GET['csv0']; if (isset($_POST['csv0'])) $csvfile0=$_POST['csv0']; $datais0=""; if (isset($_GET['data0'])) $datais0=$_GET['data0']; if (isset($_POST['data0'])) $datais0=$_POST['data0']; if ($datais0 != "" && strpos($datais0, "[") !== false && strpos($datais0, "[") < strpos($datais0, ",")) { $datais0="," . $datais0; } if (strlen($ioc) > 0 && strlen($csvfile0) > 0 && strpos(strtolower($csvfile0) . "~", ".csv~") !== false) { $csv_file_content=str_replace('~','"',str_replace("[","",str_replace("]","",str_replace(", [","\n",str_replace(",[","\n",urldecode($csvprefix . $datais0)))))); if (strpos($csv_file_content," ") === false) $csv_file_content=str_replace("'","",$csv_file_content); if (1 == 2) file_put_contents($csvfile0, $csv_file_content); // Thanks to http://stackoverflow.com/questions/4348802/how-can-i-output-a-utf-8-csv-in-php-that-excel-will-read-properly if (strlen($csv_file_content) > 0) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); $hdr='Content-Disposition: attachment; filename=' . $csvfile0; header($hdr); header('Content-Transfer-Encoding: binary'); header('Expires: 0'); header('Cache-Control: must-revalidate, post-check=0, pre-check=0'); header('Pragma: public'); echo "\xEF\xBB\xBF"; // UTF-8 BOM echo $csv_file_content; exit(); } } ?>