I'm trying to load a gzipped XML file using simplexml_load_file() PHP function, but I don't know how to decode it so I can use the data in it.
PHP has support for zlib compression build-in, just prefix the path of your file with the gzip'ed data with compress.zlib://
and you're done:
$xml = simplexml_load_file("compress.zlib://test.xml");
Works like a charm.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With