% $h = explode('.',$_SERVER['HTTP_HOST']); $x = count($h); $robot_host = $h[$x-2].'.'.$h[$x-1]; if (file_exists($_SERVER['DOCUMENT_ROOT'].'/robots.'.$robot_host.'.txt')) { header("Content-Type: text/plain"); echo '# robots.'.$robot_host.'.txt'."\n"; echo '# host '.$_SERVER["SERVER_NAME"]."\n"; readfile($_SERVER['DOCUMENT_ROOT'].'/robots.'.$robot_host.'.txt'); } else { header("HTTP/1.1 404 Not Found"); echo '