open and read a binary file, show contents as hex...
Posted: Sun Jun 22, 2003 12:32 am
hello,
i need to open a file and show it's contents as hex...
any ideas how? is there a function in PHP that will do this? byte per byte?
for instance,
$filePointer = fopen("logo.otb", "r");
$byte = fgets($filePointer, 1); // read byte per byte
// now how do i print byte as hex?
many thanks.
i need to open a file and show it's contents as hex...
any ideas how? is there a function in PHP that will do this? byte per byte?
for instance,
$filePointer = fopen("logo.otb", "r");
$byte = fgets($filePointer, 1); // read byte per byte
// now how do i print byte as hex?
many thanks.