Yngvarr

Generation

generate functionSat, 07 Jan 2023

gzencode and stream http archive

function stream_gzencode($data) { $size = strlen($data); $crc = crc32($data); $data = gzencode($data, 9); $data = substr($data, 0, -4); echo "\x1f\x8b\x08\x00\x00\x00\x00\x00"; echo $data; echo pack('V', $crc); echo pack('V', $size); } stream_gzencode(file_get_contents('http://example.com/'));

Questions about programming?Chat with your personal AI assistant