note 104765 added to function.filter-var
| From: | joelhy at osu1 dot php dot net | Date: | Wed, 06 Jul 2011 09:44:26 +0000 |
| Subject: | note 104765 added to function.filter-var | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-181275@lists.php.net to get a copy of this message | ||
For those looking for private ip checking, there it is:
<?php
function is_private_ip($ip)
{
return !filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE);
}
?>
----
Server IP: 222.73.207.145
Probable Submitter: 127.0.0.1 (proxied: 110.80.15.18)
----
Manual Page -- http://www.php.net/manual/en/function.filter-var.php
Edit -- https://master.php.net/note/edit/104765
Del: integrated -- https://master.php.net/note/delete/104765/integrated
Del: useless -- https://master.php.net/note/delete/104765/useless
Del: bad code -- https://master.php.net/note/delete/104765/bad+code
Del: spam -- https://master.php.net/note/delete/104765/spam
Del: non-english -- https://master.php.net/note/delete/104765/non-english
Del: in docs -- https://master.php.net/note/delete/104765/in+docs
Del: other reasons-- https://master.php.net/note/delete/104765
Reject -- https://master.php.net/note/reject/104765
Search -- https://master.php.net/manage/user-notes.php