Re: [PHP] Parsing URL's with Apache and PHP

2004-03-01 Thread Brian J. Celenza
Well, not quite virtual hosting. Basically, I want to parse the host whatever.somedomain.com and return the whatever part, whatever being a username for example.. use that username and draw whatever from the database to display.. So instead of a user having to do something like www.somedomain.com

Re: [PHP] Parsing URL's with Apache and PHP

2004-03-01 Thread Brian J. Celenza
That'll work! Didnt' even occur to me to combine two variables from $_SERVER, and at first I didn't thinkg HTTP_HOST would deliver what i was looking for. Thanks! "Richard Davey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hello Brian, > > Monday, March 1, 2004, 3:49:09 PM, you

Re: [PHP] Parsing URL's with Apache and PHP

2004-03-01 Thread Richard Davey
Hello Brian, Monday, March 1, 2004, 3:49:09 PM, you wrote: BJC> Are there variables or methods with apache I can use to get this entire BJC> address? All I'm seeing is the HTTP Referrer and some other _SERVER vars BJC> that do not give me the whole address. Personally I use the following (combin

Re: [PHP] Parsing URL's with Apache and PHP

2004-03-01 Thread Raditha Dissanayake
Are you trying to do dynamic virtual hosting? using PHP for that would be very inefficient look at the apache documentation for a better solution. with php splitting by the dot (.) and getting the first part ought to do the trick. or you can do a preg_match . Brian J. Celenza wrote: I'm tryi