MyBB Community Forums

Full Version: IP addresses wrong format
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I am trying to call members' IP addresses in their member, but the IP addresses in the database return weird configurations, for example 2Y??.  How do I fix this?

IP's show up correctly in the post ip.
IP addresses are stored in a binary format:
That link is way over my brain function. How do handle that information? The IP search function doesn't work because of the different format.
Use in a plugin:
$somevar = my_inet_ntop($db->unescape_binary($memprofile['lastip']));
Or with Template Conditionals:
But you'll have to add my_inet_ntop and unescape_binary to inc/plugins/phptpl_allowed_funcs.txt