Category: Networking

  • Formula for converting IP address to long

    After looking at PHP’s ip2long function I was curious about how this conversion is done. It is quiet simple and to achieve this conversion you have to take the IP address to be in base 256. Then add the product of the base raised to the power of the number position (0, 1, 2 &…