Okay, so here's a strange one.
A client's text feed is inside a zip file, another is unzipped and another is .tar.gz encoded.
I can simply open a file using
fopen()
or, if it's an xml file, by calling
simple_xml_loadfile()
But simple XML won't open a zipped file, neither will fopen (if it is a text csv file).
So how can i autodetect what compression is being used?
Q. Does that file have a .gz or .zip extension? - A. No, they are dynamically generated files.