Date: 10/17/00
- Next message: fpontieri <email protected>: "[PHP-DEV] PHP 4.0 Bug #7286: zend_operators.h:83: implicit declaration of function `int finite(...)'"
- Previous message: Sascha Schumann: "[PHP-DEV] 3.0.18RC1"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Try this snippet:
$content = "Some test string.";
$gzheader=chr(0x1F).chr(0x8B).chr(0x08).chr(0x00).chr(0x00).chr(0x00).chr(0x
00).chr(0x00).chr(0x00).chr(0x03);
$crc=putLong(crc32($content));
$len=putLong(strlen($content));
header("Content-Encoding: gzip");
echo $gzheader.substr(substr($content, 0, strlen($content)-4).$crc.$len, 2);
function putLong ($long){
for ($n = 0; $n < 4; $n++) {
$ret.=chr((integer)($long & 0xff));
$long = $long >> 8;
}
return $ret;
}
With best wishes,
Denis, webmaster <email protected>
-- PHP Development Mailing List <http://www.php.net/> To unsubscribe, e-mail: php-dev-unsubscribe <email protected> For additional commands, e-mail: php-dev-help <email protected> To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: fpontieri <email protected>: "[PHP-DEV] PHP 4.0 Bug #7286: zend_operators.h:83: implicit declaration of function `int finite(...)'"
- Previous message: Sascha Schumann: "[PHP-DEV] 3.0.18RC1"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

