I am running on a newer version of PHP, and with the depreciation of mime_content_type after loading a Github PHP script with two sections of this in it, I was wondering if someone might be able to help with what I can replace it with?
if (!function_exists('mime_content_type')) {
throw new Exception('Program needs the FILEINFO PHP extension.');
}
and
$mimeType = mime_content_type($image);
if ($mimeType != 'image/png' && $mimeType != 'image/jpg' && $mimeType != 'image/gif') {
user_error('Image mime type ' . $mimeType . ' not supported. Image will be ignored', E_USER_WARNING);
return false;
}
Any assistance would be greatly appreciated
Thanks
Robert