Re: subdomain

From: Date: Wed, 11 Sep 2002 02:31:00 +0000
Subject: Re: subdomain
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-115926@lists.php.net to get a copy of this message
Grab the $SERVER_NAME environmental variable. Then parse the variable using explode on the period in the domain name. Count the number of elements in the array. and selcct the element you want to use /dkm ----- Original Message ----- From: "Liam MacKenzie" <phplist@operationenigma.com> To: "php" <php-general@lists.php.net> Sent: Tuesday, September 10, 2002 8:55 PM Subject: [PHP] subdomain > G'day everyone, > > I have a dilemma... > I'm running BIND locally, with a wildcard A record. > That means that if someone goes to žJß^ˆr:’Ûx;ÖÓ > E 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 (#115926) next »