From 5f33f368ee4a635c93ffc73997969a2eabdf67b9 Mon Sep 17 00:00:00 2001 From: Joffrey Jaffeux Date: Wed, 6 Jun 2012 14:28:16 +0200 Subject: update documentation for ip_version() and tells valid_ip() now supports ipv6 --- user_guide_src/source/libraries/input.rst | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'user_guide_src') diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst index 432bac3c7..649fe43d6 100644 --- a/user_guide_src/source/libraries/input.rst +++ b/user_guide_src/source/libraries/input.rst @@ -228,7 +228,7 @@ $this->input->valid_ip($ip) ============================ Takes an IP address as input and returns TRUE or FALSE (boolean) if it -is valid or not. Note: The $this->input->ip_address() function above +is valid or not (works with IPv4 and IPv6). Note: The $this->input->ip_address() function above validates the IP automatically. :: @@ -242,6 +242,15 @@ validates the IP automatically. echo 'Valid'; } +$this->input->ip_version($ip) +============================ + +Takes an IP address as input and returns the version : 4 or 6. +:: + + $ip = '175.123.74.43'; + echo $this->input->ip_version($ip); // 4 + $this->input->user_agent() =========================== -- cgit v1.2.3-24-g4f1b