Menu Samaritan's Purse

IP2LONG

Converts a string containing an (IPv4) Internet Protocol dotted address into a long integer

SYNTAX

ip2long ( string $ip_address ) : int

PARAMETERS

ip_address

A standard format address.

RETURN

Returns the long integer or FALSE if ip_address is invalid.

EXAMPLES

1

The following URLs are equivalent:<br>
http://php.net/<br>
http://185.85.0.29/<br>
http://3109355549/

2

185.85.0.29<br>
3109355549<br>
3109355549

PHP