Class: atkIpUtils
Source Location: /utils/class.atkiputils.inc
Class atkIpUtils
Method Summary
| static
boolean
|
ipLongFormat() |
Converts an ip (in number or string format) to a long number |
| static
boolean
|
ipStringFormat() |
Converts an ip (in number or string format) to a string |
| static
boolean
|
ipValidate() |
Checks if the given ip (string or long numeric) is a valid ip |
Methods
static boolean ipLongFormat(
mixed
$ip
)
|
|
Converts an ip (in number or string format) to a long number
The supplied ip must be a valid ip. If the given ip is not valid, then atkerror will be called.
Parameters:
|
mixed |
$ip: |
String or long numeric IP address. |
API Tags:
| Return: | True if the ip is valid, False if not. |
static boolean ipStringFormat(
mixed
$ip
)
|
|
Converts an ip (in number or string format) to a string
The supplied ip must be a valid ip. If the given ip is not valid, then atkerror will be called.
Parameters:
|
mixed |
$ip: |
String or long numeric IP address. |
API Tags:
| Return: | True if the ip is valid, False if not. |
static boolean ipValidate(
mixed
$ip
)
|
|
Checks if the given ip (string or long numeric) is a valid ip
A string will be valid if it contains 4 integer values between 0 and 255, glued together by dots (0.1.2.3). A number will be valid if it is between 0 and 4294967295.
Parameters:
|
mixed |
$ip: |
String or long numeric. |
API Tags:
| Return: | True if the ip is valid, False if not. |