Quantcast
Viewing latest article 1
Browse Latest Browse All 8

Answer by Jehad Ahmad Jaghoub for PHP- Get file type by URL

the best way for my understanding

if (!function_exists('getUrlMimeType')) {    function getUrlMimeType($url)    {        $buffer = file_get_contents($url);        $finfo = new finfo(FILEINFO_MIME_TYPE);        return $finfo->buffer($buffer);    }}

is to create function depend on finfo class


Viewing latest article 1
Browse Latest Browse All 8

Trending Articles