Dev,
Nice work!
Thanks for implementing the book's algorithm/proving it in PHP-PCRE, and I
do like your extension into an internal/external function.
I've not implemented your code (bookmarked for later) but some initial
comments:
- don't forget some of the other 'funnies' in the IP addressing sc
Well after reading John'ss and DL Neil's replys i came up with 2 functions.
The first is to check to see if the entry is a valid IP address and the
Next is to determine if it is a Private Network IP or not!.
You can see this in action at:
http://www.my-tangled-web.net/codebank/code/ip_check.php
a
John,
> I think it'd be hard to verify the range with a regex. ip2long and long2ip
> do not validate. So, an option would be to write your own little function
> that splits the $ip on the period, verifies there are 4 parts, then checks
> that each part is between 1 and 255 inclusive.
My other po
Hello Dev,
> Now I am continuing on with the same script and I need to check for valid
> IP address form.
> Currently I have:
>
> $ip="255.255.255.0";
> if (preg_match ("/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/", $ip))
{
> print "Good Ip";
> } else {
> print "Bad Ip";
> }
>
> Thi
> Now I am continuing on with the same script and I need to check for valid
> IP address form.
> Currently I have:
>
> $ip="255.255.255.0";
>
> if (preg_match ("/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/", $ip))
{
> print "Good Ip";
> } else {
> print "Bad Ip";
> }
>
> This does wor
Hello all,
Let me first say thank you to Jason Wong and Adam Voigt for their help on
my problem with Multidimensional Arrays!!!
Now I am continuing on with the same script and I need to check for valid
IP address form.
Currently I have:
$ip="255.255.255.0";
if (preg_match ("/[0-9]{1,3}\.[0-9
6 matches
Mail list logo