good job!! but you missed something. startblock and data must be aligned on a 4 byte boundary, as per my not so pretty code:
Code:$zeronum = $startblockoffset % 4; $zeronum = 4 - $zeronum; if ($zeronum ne "0") { $startblockoffset = $startblockoffset + $zeronum; for ($i=1; $i<=$zeronum; $i++) { $zeros1 = pack C, 0; $zeros = $zeros . $zeros1; } }







Reply With Quote