Source code php Rez Extractor
- PHP extractor for LTB
Code:
<?php function hexToStr($hex){ $string=''; for ($i=0; $i < strlen($hex)-1; $i+=2) { $string = chr(hexdec($hex[$i].$hex[$i+1])); }return $string;}
$rez = file_get_contents("RF016.REZ"); // get the rez as a string
$ltbs = explode(hexTostr('0100090000000000'),$rez); //make an array containing the ltbs, its header is cut off, but we gonna fix that
foreach($ltbs as $k => $v) { if($k==0) continue; //skip the first, its the rez header $f = fopen("model_".$k.".ltb","a+"); //save as model_NUMBER fwrite($f,hexTostr('0100090000000000 ').$v); //write the header + the ltb itself fclose($f); } sleep(3000); ?>
//Là chú thích
Post a Comment