var_dump($_SERVER); e vedi che parte ti torna utile es.: $_SERVER['HTTP_HOST']
La vita e' uno switch();
Regole del Forum