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" <[EMAIL PROTECTED]> 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 > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php