RE: [SLUG] host header name in PHP?

From: pwgrant (pwgrant@cssi-fl.com)
Date: Thu Mar 27 2003 - 15:41:02 EST


Thanks. I think I asked the wrong question. What I am looking or is that
URL in the address bar.
Both these examples yield serverName.IinternalDomainNameOfTheMachine.com,
not www.domainNameTypedIn.com

For example I type in a browser:
www.myInternetDomain.com

the output rendered by these examples are both
machineHostName.myInternalDomainName.com

How can I print out ALL environment variables and their values? I found
phpinfo() but nothing gets displayed.

-----Original Message-----
From: slug@lists.nks.net [mailto:slug@lists.nks.net]On Behalf Of Robert
Ahrendt
Sent: Thursday, March 27, 2003 2:50 PM
To: slug@nks.net
Subject: RE: [SLUG] host header name in PHP?

2 ways,
<?php echo("$HTTP_HOST") ?>
or
<?php echo("$SERVER_NAME")?>
but $SERVER_NAME gets the name from your httpd.conf file
where $HTTP_HOST is actually from the environment vars
Hope this helps
Robert

-----Original Message-----
From: slug@lists.nks.net [mailto:slug@lists.nks.net]On Behalf Of pwgrant
Sent: Thursday, March 27, 2003 8:43 AM
To: SLUG List (E-mail)
Subject: [SLUG] host header name in PHP?

How can php echo out the host header name?

In asp it could be
<% response.write (request.servervariables("HTTP_HOST") ) %>



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 17:18:31 EDT