Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php get current domain

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

$currentDomain = $_SERVER['SERVER_NAME'];
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #php #current #domain
ADD COMMENT
Topic
Name
6+2 =