LongToStringIP Method

This method is converts a four-byte long integer which represents an IP address into a string representation of the IP address. For example,

Syntax:

 IPasLong = chObj.LongToStringIP [ipAsLong]

ipAsLong: A four-byte value in the range of -2147483648 to 2147483647 to be converted from a long to an IP address in string format.

Returns:

A string representing the IP address converted from the four-byte integer. For example, if a value of –1 is passed as the ipAsLong parameter this method will return "255.255.255.255".

Example:

<% set chObj = CreateObject("cyScape.countryObj")

ipAsLong = -106273140

response.write "Your IP as a string is: " & chObj.LongToStringIP ipAsLong

This method is designed for in conjunction with the StringIPToLong method.

 

See Also:

StringIPToLong Method

CountryStats Object Properties and Methods

RegionStats Object Properties and Methods