summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source')
-rw-r--r--user_guide_src/source/changelog.rst1
-rw-r--r--user_guide_src/source/libraries/input.rst11
2 files changed, 11 insertions, 1 deletions
diff --git a/user_guide_src/source/changelog.rst b/user_guide_src/source/changelog.rst
index ce9b06883..3118b7dc5 100644
--- a/user_guide_src/source/changelog.rst
+++ b/user_guide_src/source/changelog.rst
@@ -135,6 +135,7 @@ Release Date: Not Released
- Allowed for setting table class defaults in a config file.
- Added a Wincache driver to the :doc:`Caching Library <libraries/caching>`.
- Added dsn (delivery status notification) option to the :doc:`Email Library <libraries/email>`.
+ - Input library now supports IPv6 and has a ip_version() method.
- Renamed method _set_header() to set_header() and made it public to enable adding custom headers in the :doc:`Email Library <libraries/email>`.
- Core
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()
===========================