note 73841 added to function.gzdecode

From: Date: Mon, 12 Mar 2007 19:02:01 +0000
Subject: note 73841 added to function.gzdecode
Groups: php.notes 
Request: Send a blank email to php-notes+get-124385@lists.php.net to get a copy of this message
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/ ---- Server IP: 69.147.83.197 Probable Submitter: 77.234.83.246 ---- Manual Page -- http://www.php.net/manual/en/function.gzdecode.php Edit -- https://master.php.net/note/edit/73841 Del: integrated -- https://master.php.net/note/delete/73841/integrated Del: useless -- https://master.php.net/note/delete/73841/useless Del: bad code -- https://master.php.net/note/delete/73841/bad+code Del: spam -- https://master.php.net/note/delete/73841/spam Del: non-english -- https://master.php.net/note/delete/73841/non-english Del: in docs -- https://master.php.net/note/delete/73841/in+docs Del: other reasons-- https://master.php.net/note/delete/73841 Reject -- https://master.php.net/note/reject/73841 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#124385) next »