hostName

Typefunction
DictionaryLCS
LibraryLiveCode Script
Syntax
the hostName
hostName()
Summary

Returns the domain name of the local system.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
if the hostName is "localhost.example.org" then return empty
Values
NameTypeDescription
return

The hostName function returns the domain name of the computer.

RelatedCommand: accept
Function: hostAddress, DNSServers
Control Structure: function
Glossary: domain name, error message, return, DNS
Description

Use the hostName function to find the domain name of the computer that LiveCode is running on.

The hostName function does a reverse DNS lookup on the hostAddress in order to find the domain name. This means that the computer must be connected to the Internet in order to use this function. If a connection to the Internet is not available, the hostName function returns an error message.

Tagsnetworking