/ Published in: PHP
php get current domain name without www or subdomain
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<?php $host = $_SERVER['HTTP_HOST']; echo "domain name is: {$matches[0]}\n"; ?>
URL: http://www.appsmobiledev.com/