Murciano Posted May 3, 2010 Share Posted May 3, 2010 I need to compress xml files with something like this $content = file_get_contents("includes/datafeed.xml"); $compressed = base64_encode(gzcompress($content)); ?> <textarea> <?php echo $compressed; ?> </textarea> as you can see im echo'ing the output to see if it is working, Hmmmmmmm it does to an extent, the thing is that to be sure its working i am uncompressing the original unedited datafeed.xml.gz files with $content = file_get_contents("datafeed.xml.gz"); $coded = gzuncompress(substr(base64_decode($content),3)); and then recompressing with the code that is inside the first block, echoing the code to check and they are very different, am i missing something?.. mime types etc, Link to comment https://forums.phpfreaks.com/topic/200574-xml-file-compression-with-php/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.