Nel tutorial di oggi imparerete come ottenere il nome del dominio di una URL senza www o sotto-dominio.
< ?php
$host = $_SERVER[‘HTTP_HOST’];
preg_match("/[^\.\/]+\.[^\.\/]+$/", $host, $matches);
echo "domain name is: {$matches[0]}\n";
?>
fonte: www.sastgroup.com ? Vai al post originale






