Hi,

I am trying to get the contents of a gzip file located on the server.
This code only prints the binary content of the file.

var msgUrl = "../messages/"+compressedMessage+".gz";
objXml.open("GET",msgUrl,false);
objXml.send(null);
alert(objXml.responseText);

Any ideas how to get this working?

Thanks!

Member Avatar for langsor

I haven't worked with gz files before, but I think you can get the contents using PHP methods ... here's a link: http://us.php.net/manual/en/function.readgzfile.php

It probably maters what file-type you have in the zipped format too.

Maybe someone else more knowledgeable will chime in with better advice.

Good luck

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.