Re: [PHP] How verify whether browser arrived via IPv6, IPv4, domain or number

2010-08-18 Thread Per Jessen
Leith Bade wrote: > I want to take $_SERVER['SERVER_NAME'] and figure out whether the user > arrived by typing an IPv6-only, IPv4-only or dual IPv4/IPv6 DNS > address. > > It should also handle the case where the user enters a numeric address > in one of the formats the sockets inet_addr() functi

[PHP] How verify whether browser arrived via IPv6, IPv4, domain or number

2010-08-17 Thread Leith Bade
I want to take $_SERVER['SERVER_NAME'] and figure out whether the user arrived by typing an IPv6-only, IPv4-only or dual IPv4/IPv6 DNS address. It should also handle the case where the user enters a numeric address in one of the formats the sockets inet_addr() function can handle. Such as IPv4/IPv