note 72205 deleted from function.gzencode by nlopess
| From: | nlopess@php.net | Date: | Sun, 07 Jan 2007 23:35:06 +0000 |
| Subject: | note 72205 deleted from function.gzencode by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-121401@lists.php.net to get a copy of this message | ||
Note Submitter: fantasysportswire at yahoo dot com
----
A simple gzdecode similiar to the last one on the page minus any problems. Works for me - and none
of the more "elegant" ideas presented below wanted to work for me on Windows.
<?
function xgzdecode($data) {
$temp = tempnam("...","FSW");
file_put_contents($temp,$data);
$data=implode(gzfile($temp));
unlink($temp);
return $data;
}
?>
... and yea - see the example below for a use of the gzencode... that is one ugly (old) example in
the documentation.