Conversion tables A-K
  Conversion tables L-Z
  SPAM database query
  Reverse WHOIS utility
  North America area codes
  PHP Example forums

PHP example repository.

Back to examples
Converts an IP address from a string to a positive integer.

Take an IP address in format and converts it to an integer value. The addition in this routine makes sure the returned number is a positive value, which allows for easier handling of comparisions on the integer value if the original IP is greater than

// We will user the remote IP for this example

$ip2 ip2long($REMOTE_ADDR);

    if (
$ip2 0$ip2 += pow(2,32);