<span class="hljs-meta"><?php</span>
<span class="hljs-function"><span class="hljs-keyword">function</span> <span class="hljs-title">getUrlMimeType</span><span class="hljs-params">($url)</span> </span>{
    $buffer = file_get_contents($url);
    $finfo = <span class="hljs-keyword">new</span> finfo(FILEINFO_MIME_TYPE);
    <span class="hljs-keyword">return</span> $finfo->buffer($buffer);
}