note 66191 added to function.inet-pton
| From: | meatdiogoresendedotnet at osu1 dot php dot net | Date: | Tue, 16 May 2006 21:34:28 +0000 |
| Subject: | note 66191 added to function.inet-pton | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-111409@lists.php.net to get a copy of this message | ||
If you want to use the above function you should test for ':' character before
'.'. Meaning, you should check if it's an ipv6 address before checking for ipv4.
Why? IPv6 allows this type of notation:
::127.0.0.1
If you check for '.' character you will think this is an ipv4 address and it will fail.
----
Server IP: 81.92.200.26
Probable Submitter: 84.90.27.238
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.inet-pton.php
Edit -- http://master.php.net/note/edit/66191
Del: integrated -- http://master.php.net/note/delete/66191/integrated
Del: useless -- http://master.php.net/note/delete/66191/useless
Del: bad code -- http://master.php.net/note/delete/66191/bad+code
Del: spam -- http://master.php.net/note/delete/66191/spam
Del: non-english -- http://master.php.net/note/delete/66191/non-english
Del: in docs -- http://master.php.net/note/delete/66191/in+docs
Del: other reasons-- http://master.php.net/note/delete/66191
Reject -- http://master.php.net/note/reject/66191
Search -- http://master.php.net/manage/user-notes.php