Re: Damned HTTP_HOST

From: Date: Tue, 26 Feb 2002 16:48:26 +0000
Subject: Re: Damned HTTP_HOST
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-86272@lists.php.net to get a copy of this message
there is always a way. $IP = $GLOBALS['SERVER_ADDR']; $IP = $GLOBLAS['HTTP_HOST']; $IP = $GLOBALS[HTTP_SERVER_VARS][HTTP_HOST]; do a print_r() on $HTTP_SERVER_VARS and see what you get or use this function <? function list_array ($array) { foreach($array AS $key => $value) { echo "<b>$key:</b> $value<br>\n"; } } list_array ($GLOBALS[HTTP_SERVER_VARS]); ?> Jim Lucas ----- Original Message ----- From: "Dominique van der Wal" <dvdw@plan.be> To: <php-general@lists.php.net> Sent: Tuesday, February 26, 2002 6:38 AM Subject: [PHP] Damned HTTP_HOST > Hi, > > I'm trying to find the HTTP_HOST adress of my website. > > I've try the followings : > > $HTTP_HOST : nothing > $ALL_HTTP["HTTP_HOST "] : nothing > $_SERVER["HTTP_HOST "] : nothing > > > But when I print $ALL_HTTP or $_SERVER, I obtain the followings lines : > > HTTP_ACCEPT_CHARSET iso-8859-1,*,utf-8 > HTTP_ACCEPT_LANGUAGE en,fr-BE > HTTP_ACCEPT_ENCODING gzip > HTTP_PRAGMA no-cache > HTTP_ACCEPT image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, > HTTP_HOST 193.190.218.xxx > > So, how can I receive this damned HTTP_HOST adress ? > > Thank you in advance > Dominique van der Wal > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#86272) next »