edit the file with php or an editor like ultraedit? in ultraedit hit Ctrl-H
in php its no different then it would be opening an ascii file. no
different, just make sure to use fwrite()
http://www.php.net/manual/en/function.fwrite.php
<?php
function compress_output($output)
{
$crc = pack('V',crc32($output));
$size = pack('V',strlen($output));
$output = gzcompress($output, 9);
$data = "\x1f\x8b\x08\x00\x00\x00\x00\x00";
$data .= substr($output, 0, strlen($output) - 4);
$data .= $crc;
$data .= $size;
return $data;
}
$file_name = '/tmp/somefile.txt';
$file_p = fopen($filename, 'w+');
$file_data = fread($file_p, filesize($filename));
$file_data = compress_output($file_data);
fwrite($fp, $file_data, strlen($file_data));
?>
--
Chris Lee
Mediawaveonline.com
em. [EMAIL PROTECTED]
ph. 250.377.1095
ph. 250.376.2690
fx. 250.554.1120
""Matt"" <[EMAIL PROTECTED]> wrote in message
008401c09c0c$14348220$64019998@mattt">news:008401c09c0c$14348220$64019998@mattt...
Does anyone know how I can do this?
I've got the file but before I write it to the server I was to change a hex
value in the file, does anyone know how this could be done?
Thanks,
matt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]