MyBB Community Forums

Full Version: Mybb ip algorithm
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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?
replies here can be helpful !
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:

(2020-02-04, 12:33 PM).m. Wrote: [ -> ]replies here can be helpful !