Parsing Current Server Domain

From: Date: Thu, 28 Aug 2003 16:04:19 +0000
Subject: Parsing Current Server Domain
Groups: php.general 
Request: Send a blank email to php-general+get-161056@lists.php.net to get a copy of this message
Does anyone know how I would parse the domain that scripts are currently being executed in? For example: I use seperate domains for development and production. There are times I have to specify a hard coded url instead of a relative one. So for the development it would be; dev.domain.com/somefile.php where on the live site it would be www.domain.com/somefile.php I would like the script to be able to parse the domain part so it would be; $currentdomain/somefile.php AAny suggestions would be greatly appreciated. Jeff Pearson

« previous php.general (#161056) next »