Re: subdomain

From: Date: Wed, 11 Sep 2002 01:21:19 +0000
Subject: Re: subdomain
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-115918@lists.php.net to get a copy of this message
Try this: $subdomain = $_SERVER["SERVER_NAME"]; And then get all the text before the first ".". Tyler On Wed, 11 Sep 2002 10:55:56 +1000 "Liam MacKenzie" <phplist@operationenigma.com> wrote: > G'day everyone, > > I have a dilemma... > I'm running BIND locally, with a wildcard A record. > That means that if someone goes to > http://somebullshit.mydomain.com/ > they'll get my page up. > > What I want to do is catch that subdomain into a variable... Is there > a PHP global that can get that? > So, if someone goes to http://liam.mydomain.com/, the page will > echo > "Hello Liam" > > Any ideas guys? > > Cheers, > Liam > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#115918) next »