Skip to content

Instantly share code, notes, and snippets.

@nprussell
Created June 13, 2016 14:22
Show Gist options
  • Save nprussell/695554cca22d8330224d5d3dc371db89 to your computer and use it in GitHub Desktop.
Save nprussell/695554cca22d8330224d5d3dc371db89 to your computer and use it in GitHub Desktop.
$uploadedFile = "uploads/out.upz";
$handle = fopen($uploadedFile, 'rb');
if( ! $handle ) {
throw new Exception( "Can't open file" );
}
$buffer = fread( $handle, 14 );
echo "<br><br>";
$header_format =
'A3Magic/' .
'S2UpdaterVer/' .
'C1TestingMode/' .
'L8BuildTime/' ;
$header = unpack ($header_format, $buffer);
print_r($header);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment