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.
See Question&Answers more detail:osI'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.
See Question&Answers more detail:osPHP 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.