What base type returned by the function "fread()" of PHP, and how can I convert this type to be shown as hexa on the screen?
If I do it that way:
while(!feof($resource))
{
$contents = fread($resource, 1);
$new = intval($contents);
echo base_convert($new, 10, 16);
}
Its just prints a bunch of zeros on the screen... Why its not the same as doing
$contents = fread($resource, filesize($file_text));
echo bin2hex($contents);
Which prints the normal hexa?