note 73841 deleted from function.gzdecode by nlopess

From: Date: Sun, 18 Mar 2007 12:33:50 +0000
Subject: note 73841 deleted from function.gzdecode by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-124558@lists.php.net to get a copy of this message
Note Submitter: open78 at freemail dot hu ---- gzdecode doesn't exists in my PHP 4.x installation fortunately it is very easy to write // Define the gzdecode function if (!function_exists('gzdecode')) { function gzdecode ($data) { // Check if data is GZIP'ed if (strlen($data) < 18 || strcmp(substr($data,0,2),"\x1f\x8b")) { return false; } // Remove first 10 bytes $data = substr($data, 10); // Return regular data return gzinflate($data); } } I've found this solution at http://www.phpit.net/blog/

« previous php.notes (#124558) next »