php get current domain
snippet in php

php get current domain

user7514

// Warning: This can be manipulated by hackers!
// If this is problematic, store the domain in a config file

$currentDomain = $_SERVER['SERVER_NAME'];

how to detect intial domain using php\

user4513

$_SERVER['REQUEST_URI']