MyBB Community Forums

Full Version: format the ip like it shows in the database
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i am trying to figure out how mybb formats the ip address in the database

as in how it stores and reads it.

i am working on a script for my own forum and i can't get the ip to show right cause i am not sure how to get the ip address
(2015-02-03, 11:58 AM)nth Wrote: [ -> ]Check this fix I did a while ago: https://github.com/Naththo/mybb/commit/8...d2ef1a81c2

that won't work. i have tried that.

i am wondering how do i go about formatting the ip properly in a custom script.

it won't register the ip properly and when it does add it to the database it doesn't show on the forum.


the ips are showing as this: 18e71a67

i am wondering how it does that?

my_inet_ntop doesn't do that.

nvm figured it out.

my_inet_pton what i needed.

formats it into ip
my_inet_pton formats its into a bin style