i faced PHP: Call to undefined function gzdecode() error few days back so i have been using this in php
function gzdecode($data)
{
return gzinflate(substr($data,10,-8));
}
ref: PHP: Call to undefined function gzdecode()
i found this old code snippet while looking in old php files , so can i use above code instead of this one ?
function gzdecode($data) {
$g=tempnam('/tmp', 'php-gz');
@file_put_contents($g, $data);
ob_start();
readgzfile($g);
$d=ob_get_clean();
unlink($g);
return $d;
}