Using php how would I be able to define the variable $type into the content-type of http://www.example.com
$type
content-type
For example: $type
Sometimes get_header return wrong values becouse it read http headers, but not file. It should be better use finfo:
$finfo = new finfo(FILEINFO_MIME_TYPE); $type = $finfo->buffer(file_get_contents($link));