Skip to content

Latest commit

 

History

History
13 lines (10 loc) · 604 Bytes

README.md

File metadata and controls

13 lines (10 loc) · 604 Bytes

PHP IP Address Math

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... 😅)