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 trying to setup a system where I can parse the entire URL that is given
in the address bar of the broswer.

My intentions are to make use of the parse_url() function supplied in PHP,
but I cannot find a way to get the full address requested.

Example:

http://bcelenza.somedomain.com/index.php?page=blah

Are there variables or methods with apache I can use to get this entire
address? All I'm seeing is the HTTP Referrer and some other _SERVER vars
that do not give me the whole address.

The reason I am trying to do this is to parse the address
bcelenza.somedomain.com to return the subdomain, bcelenza.

Any ideas are certainly appreciated.

Thank you,
Brian





--
Raditha Dissanayake.
------------------------------------------------------------------------
http://www.radinks.com/sftp/         | http://www.raditha.com/megaupload
Lean and mean Secure FTP applet with | Mega Upload - PHP file uploader
Graphical User Inteface. Just 150 KB | with progress bar.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to