the hostname return value

Alex Tweedly alex at tweedly.net
Sun May 15 01:46:07 CEST 2016


It's in $_SERVER["server_name"]

Lots of other good stuff there .... see below

-- Alex.

(XXX replaced all the real data :-)

DOCUMENT_ROOT = /home/XXX
GATEWAY_INTERFACE = CGI/1.1
HTTP_ACCEPT = 
text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
HTTP_ACCEPT_ENCODING = gzip, deflate, sdch
HTTP_ACCEPT_LANGUAGE = en-US,en;q=0.8
HTTP_CONNECTION = keep-alive
HTTP_COOKIE = 
__utmz=1.1444226757.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); 
__utma=1.1727492361.1444226757.1450141579.1450214538.27
HTTP_HOST = XXX.com
HTTP_UPGRADE_INSECURE_REQUESTS = 1
HTTP_USER_AGENT = Mozilla/5.0 (Macintosh; Intel Mac OS X 10_10_5) 
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36
PATH_INFO =
PATH_TRANSLATED = /home/XXX/try.lc
QUERY_STRING =
REMOTE_ADDR = 81.156.20.35
REMOTE_PORT = 63047
REQUEST_METHOD = GET
REQUEST_URI = /try.lc
SCRIPT_FILENAME = 
/usr/local/cpanel/cgi-sys/livecodeserver-7.1.0/livecode-server
SCRIPT_NAME = /cgi-bin/livecode-server
SERVER_ADDR = 50.28.39.1
SERVER_ADMIN = webmaster at XXX.on-rev.com
SERVER_NAME = XXX.com
SERVER_PORT = 80
SERVER_PROTOCOL = HTTP/1.1
SERVER_SIGNATURE =
SERVER_SOFTWARE = Apache/2.4.18 (Unix) OpenSSL/1.0.1e-fips mod_bwlimited/1.4



On 14/05/2016 23:27, ethan at lish.net wrote:
> Greetings
> Sorry if this is a novice question. Just moving into on-rev.com and I'm getting tripped up by some fundamentals.
> Is there a trick to getting the correct (pseudo) hostname when running server-side LC code on on-rev.com?
> The built in function 'the hostname' only seems to return diesel.on-rev.com
> Thanks,Ethan
> ethan at lish.net240.876.1389
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



More information about the use-livecode mailing list