note 16768 added to function.ob-gzhandler

From: Date: Mon, 12 Nov 2001 22:04:07 +0000
Subject: note 16768 added to function.ob-gzhandler
Groups: php.notes 
Request: Send a blank email to php-notes+get-20767@lists.php.net to get a copy of this message
You should use this with care. Some browsers claim they support gz-data, but they don't. Some proxies do the same and pass compressed data to their clients - without telling them! So here is what I would recommend to use: $use_gz = true; if (eregi("NetCache|Hasd_proxy", $HTTP_SERVER_VARS['HTTP_VIA']) || eregi("^Mozilla/4\.0[^ ]", $USER_AGENT)){$use_gz = false;} if ($use_gz) { @ob_start("ob_gzhandler"); } header("Vary: Accept-Encoding"); -- http://www.php.net/manual/en/function.ob-gzhandler.php http://master.php.net/manage/user-notes.php?action=edit+16768 http://master.php.net/manage/user-notes.php?action=delete+16768 http://master.php.net/manage/user-notes.php?action=reject+16768

« previous php.notes (#20767) next »