Site Tools


iptoname

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

iptoname [2006/08/01 04:13] (current)
Line 1: Line 1:
 +# $EPIC: iptoname.txt,​v 1.3 2006/08/01 03:47:40 sthalik Exp $
 +======Synopsis:​======
 +$__iptoname__(<​ip address>​) \\ 
 +$__nametoip__(<​hostname>​)
 +
 +======Technical:​======
 +These functions are used to convert an IP address to a hostname, and vice
 +versa. ​  The $__iptoname__() function returns the hostname associated with
 +the given IP address, and $__nametoip__() does the opposite.
 +
 +======Practical:​======
 +These functions are used to convert between IP addresses and Internet
 +hostnames. ​ Obvious reasons aside, they are mostly useful when you know
 +which of the two the input will be.  They return nothing if the address
 +could not be converted, or if the input was invalid. ​ The $[[convert]]()
 +function should be used if the input is known to vary.
 +
 +======Returns:​======
 +iptoname: hostname for the given IP address
 +nametoip: IP address for the given hostname
 +
 +======Examples:​======
 +<​file>​
 +$iptoname(127.0.0.1) ​        ​probably returns "​localhost"​
 +$nametoip(localhost) ​        ​probably returns "​127.0.0.1"​
 +$iptoname(localhost) ​        ​error,​ input is not an IP address
 +$nametoip(127.0.0.1) ​        ​error,​ input is not a hostname
 +</​file>​
  
iptoname.txt ยท Last modified: 2006/08/01 04:13 (external edit)