note 11510 deleted from function.gzopen by jimw

From: Date: Fri, 11 Jan 2002 21:31:49 +0000
Subject: note 11510 deleted from function.gzopen by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-24690@lists.php.net to get a copy of this message
I have had some trouble trying to get the gzopen() function to open .gz files straight from a HTTP connection. here is what I had to do to get .gz files from a HTTP connection (Note that there is no error checking here..). $gzfile = fopen("www.test.com/testfile.gz", "rb"); $tempfile = fopen("temp_file.gz", "wb"); while (!feof($gzfile)) { $char = fgetc($gzfile); fputs($tempfile, $char); } fclose($tempfile); fclose($gzfile); $gzfile = gzopen("temp_file.gz", "r"); you can now use gzgets or gzread to read the .gz file. I hope this helps someone.

« previous php.notes (#24690) next »