A small piece of PHP code I put together as a proof-of-concept for a work colleague.
By using ip2long
and long2ip
functions
along with bitwise operators
it was possible to eliminate an extra input field from the HTML form since the
the IPv4 gateway was supposed to always be the first address.
(The joys of custom configuration templating before other frameworks were wildly popular... 😅)