186,000 miles per second, it’s not just a good idea, it’s the law.
I poked around online the other day looking for some PHP code that would do things like tell me whether or not a user was using IPv6. I found some code that did the job after a bit of Googling.
The code was pretty ugly, so I fixed it up. While I was at it, I updated it to optimize it a bit, as well as use conventions found in newer versions of PHP, such as the $_SERVER[] variable array, etc. Further, since I only needed to detect whether or not a user was using IPv6, I was able to cut the code that did IPv6 address compression and uncompression.
Leave a reply