Basically, I have
$file = file_get_contents("php://input");
where $file will be a string, a long one. I wonder if I can read the filetype from $file?
Basically, I have
$file = file_get_contents("php://input");
where $file will be a string, a long one. I wonder if I can read the filetype from $file?
What’s restricting you from using the filetype() function? I mean, getting the filetype just from the actual contents of the file would be quite difficult I imagine.