note 15411 added to function.gzencode

From: Date: Sun, 09 Sep 2001 04:14:47 +0000
Subject: note 15411 added to function.gzencode
Groups: php.notes 
Request: Send a blank email to php-notes+get-17841@lists.php.net to get a copy of this message
function alt_gzdecode($str) { // seed with microseconds since last "whole" second mt_srand((float)microtime()*1000000); $eh="/tmp/php-" . md5(mt_rand(0,mt_getrandmax())) . ".gz"; $fd=fopen($eh,"w"); fwrite($fd,$str); fclose($fd); unset($str); $fd = gzopen ($eh, "r"); while (1==1) { $s=gzread($fd,10240); if ("$s" == "") { break; } $str=$str . $s; } unlink($eh); return $str; } http://www.php.net/manual/en/function.gzencode.php

« previous php.notes (#17841) next »