summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/libraries/input.rst
diff options
context:
space:
mode:
authorJoffrey Jaffeux <j.jaffeux@gmail.com>2012-06-06 14:28:16 +0200
committerJoffrey Jaffeux <j.jaffeux@gmail.com>2012-06-06 14:28:16 +0200
commit5f33f368ee4a635c93ffc73997969a2eabdf67b9 (patch)
tree92fd776c199a480ca7d7f3796d72faf7270a94ee /user_guide_src/source/libraries/input.rst
parent73ed3ed3e2cf3efeb8332c569e589f16468daf7d (diff)
update documentation for ip_version() and tells valid_ip() now supports ipv6
Diffstat (limited to 'user_guide_src/source/libraries/input.rst')
-rw-r--r--user_guide_src/source/libraries/input.rst11
1 files changed, 10 insertions, 1 deletions
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()
===========================