1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.3 Getting IP from xf_ip table

Discussion in 'XenForo Questions and Support' started by Tyrone Chicken, Jul 1, 2014.

  1. Tyrone Chicken

    Tyrone Chicken New Member

    Could anyone tell me how to get the ip from the xf_ip table? there is a row called "ip" but it's not plain text.
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    The easiest way is to navigate to the content in the front end. Otherwise you need to do a decent but of math.
  3. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    What is the goal? Are you looking for a specific IP? Or are you wanting to know what IPs have been used by a specific user?

    If you are running MySQL 5.6.3 or higher then this function should work:

    SELECT INET6_NTOA(ip) AS ipaddress
    FROM xf_ip
    Otherwise there isn't an easy way to query the readable IP since XF started supporting IPv6 addresses.
    thedude likes this.
  4. Tyrone Chicken

    Tyrone Chicken New Member


Share This Page