Check and validate IPv6 addresses in PHP

Discussion in 'PHP' started by ryan1414, Dec 12, 2009.

  1. #1
    Ok so if i build a membership website in PHP5 where people login etc, do i need to use this Pear package?:

    http://pear.php.net/package/Net_IPv6

    What would happen if i did not use the PEAR package, and a ipv6 user visited my php website, will they get an error because PHP5 on it's own doesn't support IPv6 addresses?

    By the way, the php function gethostbyname only works with IPv4 addresses:
    http://www.php.net/manual/en/function.gethostbyname.php
     
    ryan1414, Dec 12, 2009 IP
  2. Wogan

    Wogan Peon

    Messages:
    81
    Likes Received:
    3
    Best Answers:
    2
    Trophy Points:
    0
    #2
    Not too many people have IPv6 yet (that I know of), so I'd just start working on the site regardless. If you do encounter people that need IPv6 support, your first stop is setting up the router for your webserver, as well as updating the networking software (before you even get to the PHP module).
     
    Wogan, Dec 13, 2009 IP
  3. mydir

    mydir Active Member

    Messages:
    352
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Hi @ryan1414 - check this:
    http://www.weberdev.com/get_example-3921.html
    Code (markup):
     
    mydir, Dec 14, 2009 IP