i have two sub-domains pointing at the same file.the sub-domain's are test.test.com and fail.test.com and the file is index.php. Now i want to be able to work with both of those domains within the same file so i used this code:
if($_SERVER['HTTP_HOST']=='test'){
echo"test";
}else if($_SERVER['HTTP_HOST']=='fail'){
echo"fail";
}
but it will not work. can anybody help? thanks in advanced