I have a PHP script that creates an xml file from the db. I would like to have the script create the xml data and immediately make a .gzip file available for download. Can you please give me some ideas?
Thanks!
I have a PHP script that creates an xml file from the db. I would like to have the script create the xml data and immediately make a .gzip file available for download. Can you please give me some ideas?
Thanks!
You can easily apply gzip compression with the gzencode function.
<?
header("Content-Disposition: attachment; filename=yourFile.xml.gz");
header("Content-type: application/x-gzip");
echo gzencode($xmlToCompress);