Stuff
public text v1 · immutablefunction getContentType( $url )
{
$headers = get_headers( $url );
print_r( $headers );
foreach( $headers as $header )
{
preg_match_all( "#Content-Type: (.[^\;]+)#i", $header, $matches );
if( !empty($matches[1][0]) )
{
return $matches[1][0];
}
}
return "unknown";
}