PHP Класс Piwik\IP
As of Piwik 1.3, IP addresses are stored in the DB has VARBINARY(16),
and passed around in network address format which has the advantage of
being in big-endian byte order. This allows for binary-safe string
comparison of addresses (of the same length), even on Intel x86.
As a matter of naming convention, we use
$ip for the network address format
and
$ipString for the presentation format (i.e., human-readable form).
We're not using the network address format (in_addr) for socket functions,
so we don't have to worry about incompatibility with Windows UNICODE
and inetPtonW().
Показать файл
Открыть проект
Примеры использования класса
Открытые методы
Описание методов
getFirstIpFromList()
публичный статический Метод
Returns the last IP address in a comma separated list, subject to an optional exclusion list.
public static getFirstIpFromList ( string $csv, array $excludedIps = null ) : string |
$csv |
string |
Comma separated list of elements. |
$excludedIps |
array |
Optional list of excluded IP addresses (or IP address ranges). |
Результат |
string |
Last (non-excluded) IP address in the list or an empty string if all given IPs are excluded. |