Joomla CMS
3.9.25 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.9.25 et du framework Joomla Platform intégré
|
Fonctions membres publiques statiques | |
static | getIp () |
static | setIp ($ip) |
static | isIPv6 ($ip) |
static | IPinList ($ip, $ipTable='') |
static | workaroundIPIssues () |
static | setAllowIpOverrides ($newState) |
Fonctions membres protégées statiques | |
static | detectAndCleanIP () |
static | detectIP () |
static | inetToBits ($inet) |
static | checkIPv6CIDR ($ip, $cidrnet) |
Fonctions membres privées | |
__construct () | |
Attributs privés statiques | |
static | $ip = null |
static | $allowIpOverrides = true |
IpHelper is a utility class for processing IP addresses
This class is adapted from the FOFUtilsIp
class distributed with the Joomla! CMS as part of the FOF library by Akeeba Ltd. The original class is copyright of Nicholas K. Dionysopoulos / Akeeba Ltd.
|
private |
Private constructor to prevent instantiation of this class
|
staticprotected |
Checks if an IPv6 address $ip is part of the IPv6 CIDR block $cidrnet
string | $ip | The IPv6 address to check, e.g. 21DA:00D3:0000:2F3B:02AC:00FF:FE28:9C5A |
string | $cidrnet | The IPv6 CIDR block, e.g. 21DA:00D3:0000:2F3B::/64 |
Références IpHelper\$ip.
|
staticprotected |
Gets the visitor's IP address.
Automatically handles reverse proxies reporting the IPs of intermediate devices, like load balancers. Examples:
The solution used is assuming that the last IP address is the external one.
Références IpHelper\$ip.
|
staticprotected |
Gets the visitor's IP address
|
static |
|
staticprotected |
Converts inet_pton output to bits string
string | $inet | The in_addr representation of an IPv4 or IPv6 address |
|
static |
Checks if an IP is contained in a list of IPs or IP expressions
string | $ip | The IPv4/IPv6 address to check |
array | string | $ipTable | An IP expression (or a comma-separated or array list of IP expressions) to check against |
Références $base, $i, IpHelper\$ip, et elseif.
|
static |
Is it an IPv6 IP address?
string | $ip | An IPv4 or IPv6 address |
Références IpHelper\$ip.
|
static |
Should I allow the remote client's IP to be overridden by an X-Forwarded-For or Client-Ip HTTP header?
boolean | $newState | True to allow the override |
Références true.
|
static |
Set the IP address of the current visitor
string | $ip | The visitor's IP address |
Références IpHelper\$ip.
|
static |
Works around the REMOTE_ADDR not containing the user's IP
Références IpHelper\$ip, et elseif.
|
staticprivate |
|
staticprivate |