<doc>
	<legacy_id>2134</legacy_id>
	<name>hostNameToAddress</name>
	<type>function</type>

	<syntax>
		<example>the hostNameToAddress of <i>domainName</i></example>
		<example>hostNameToAddress(<i>domainName, [callback]</i>)</example>
	</syntax>

	<synonyms>
	</synonyms>

	<summary>Returns the <glossary tag="IP address">IP addresses</glossary> corresponding to a <glossary tag="domain name">domain name</glossary>.</summary>

	<examples>
<example>hostNameToAddress(&quot;mail.example.org&quot;)</example>
<example>put hostNameToAddress(&quot;www.&quot; &amp; thisDomain) into line 3 of theHosts</example>
<example><p>hostNameToAddress(&quot;www.domain.com&quot;, myCallback)</p></example>
	</examples>

	<history>
		<introduced version="1.0">Added.</introduced>
		<deprecated version=""></deprecated>
		<removed version=""></removed>
		<changed version="4.5">Callback patameter added</changed>
	</history>

	<objects>
	</objects>

	<platforms>
		<mac/>
		<windows/>
		<linux/>
		<ios/>
		<android/>
	</platforms>

	<classes>
		<desktop/>
		<server/>
		<web/>
		<mobile/>
	</classes>

	<security>
	</security>


	<classification>
		<category>Networks &amp; Communication</category>
	</classification>

	<references>
		<function tag="DNSServers">DNSServers Function</function>
		<command tag="accept">accept Command</command>
	</references>

	<description>
	<overview>Use the <b>hostNameToAddress</b> <control_st tag="function">function</control_st> to find the <keyword tag="numeric">numeric</keyword> <glossary tag="IP address">IP address</glossary> of the computer or computers at a given <glossary tag="domain name">domain name</glossary>.</overview>

		<parameters>
<parameter>
	<name>domainName</name>
	<description>A standard fully-qualified <a name="glossary tag=domain name">domain name</a>.</description>
</parameter>
<parameter>
	<name>callback</name>
	<description>The name of a message to send when the lookup completes.</description>
</parameter>		</parameters>

	<value>The <b>hostNameToAddress</b> function returns the <glossary tag="IP address">IP addresses</glossary> corresponding to the <glossary tag="domain name">domain name</glossary>, one per line.</value>
	<comments>The <b>hostNameToAddress</b> <control_st tag="function">function</control_st> does a <glossary tag="DNS">DNS</glossary> lookup on the <glossary tag="domain name">domain name</glossary> in order to find the <glossary tag="IP address">IP address</glossary>. This means that the computer must be connected to the Internet in order to use this <control_st tag="function">function</control_st>. If a connection to the Internet is not available, the <b>hostNameToAddress</b> <control_st tag="function">function</control_st> returns an error message in the <function tag="result">result</function> function.<p></p><p>If the <i>callback</i> parameter is specified then the call will return immediately and upon completion of the lookup, the callback will be invoked with the resolved address as a parameter.</p></comments>
	</description>
</doc>