Re: [PHP] IPv6 validation
- From: eric.butera@xxxxxxxxx ("Eric Butera")
- Date: Sat, 12 Jul 2008 14:15:46 -0400
On Sat, Jul 12, 2008 at 11:24 AM, Yeti <yeti@xxxxxxxxxx> wrote:
It will still take some time until every provider has PHP5 running, at least
where I am from. I have many customers who want me to get their sites
running on some cheap webspace they got along with their internet
connection. Then you have to tell them it won't work because of some problem
with the versions. I would love to write code for PHP5+ only.
On 7/12/08, Eric Butera <eric.butera@xxxxxxxxx> wrote:
On Sat, Jul 12, 2008 at 9:13 AM, Bernhard Kohl <bk@xxxxxxxxxx> wrote:
Doesnt filter_var() require PHP5+ ?
I have quite some systems still running 4.4.8.
On 7/12/08, Kevin Waterson <kevin@xxxxxxxxx> wrote:
This one time, at band camp, Yeti <yeti@xxxxxxxxxx> wrote:
Now i was wondering of what there might be the best way to validateIPv6
an
address.
from this url..
http://phpro.org/tutorials/Filtering-Data-with-PHP.html#9
<?php
/*** an IP address ***/
$ip = "2001:0db8:85a3:08d3:1319:8a2e:0370:7334";
/*** try to validate as IPV6 address ***/
if(filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV6) === FALSE)
{
echo "$ip is not a valid IP";
}
else
{
echo "$ip is valid";
}
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
PHP4 has been deprecated forever now. Step up to the plate and get
with 5, especially if you're still writing new code.
I installed php5 on my local dev box years ago. Since then, I've been
pulling down random sites off our servers and testing them and fixing
little gotchas. Out of the hundreds of sites we host there were only
a few problems and once I figured out what those were it really became
quite easy to fix the issues with find and replace techniques. Most
of it was limited to my oop code. ;) So while I do understand this
argument, it is pretty old and needs to just stop. Nobody was paying
my company to upgrade and fix code that busted in the transition. It
is just the nature of the business.
.
- References:
- [PHP] IPv6 validation
- From: Yeti
- Re: [PHP] IPv6 validation
- From: Kevin Waterson
- Re: [PHP] IPv6 validation
- From: "Bernhard Kohl"
- Re: [PHP] IPv6 validation
- From: "Eric Butera"
- Re: [PHP] IPv6 validation
- From: Yeti
- [PHP] IPv6 validation
- Prev by Date: Re: [PHP] Passing arguments as they are received to another function
- Next by Date: Re: [PHP] OT - RE: [PHP] scalable web gallery
- Previous by thread: Re: [PHP] IPv6 validation
- Next by thread: Re: [PHP] IPv6 validation
- Index(es):
Relevant Pages
|