lets say i execute a script like: http://www.domain.com/script.php
what would be the php code to detect the "domain.com" and make it a variable?
what would be the php code to detect the "domain.com" and make it a variable?
$domain=$_SERVER["HTTP_HOST"];
$domain=str_replace("www.","", $domain);
echo $domain;

Comment