Mybb ip algorithm
#1
Hi,
I saw that the ip from mybb database has a 0xbc2b97fb form and the varbinary format. What is the function that converts the ip into this format? I tried with
function str2bin($str) { 
  return '0x'.strtoupper(bin2hex($str));
}

but I did not succeed, how could this put in an insert into ... this format?
Reply
#2
replies here can be helpful !
Reply
#3
Mybb converts the human readable IP address to a binary format. See:
./inc/functions.php (line 7710 and following)

These PHP functions are used to convert primarily:
http://php.net/inet_pton
http://php.net/inet_ntop

[ExiTuS]
New Forum / MyBB 1.8.26 + innovative full-responsive Theme
Live-Escape-Game-Forum
Reply
#4
(2020-02-04, 12:33 PM).m. Wrote: replies here can be helpful !
Thanks!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)