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:
compress.zlib://
$xml = simplexml_load_file("compress.zlib://test.xml");
Works like a charm.
1.4m articles
1.4m replys
5 comments
57.0k users