From 2c51e2e00974c41aab39c359f3e9e27c2b9cc59e Mon Sep 17 00:00:00 2001 From: Tim Steiner <tsteiner2@unl.edu> Date: Thu, 5 Mar 2009 22:37:32 +0000 Subject: [PATCH] More case sensitivity crap --- library/Nmc/Ipaddress.php | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 library/Nmc/Ipaddress.php diff --git a/library/Nmc/Ipaddress.php b/library/Nmc/Ipaddress.php deleted file mode 100644 index c939cc6..0000000 --- a/library/Nmc/Ipaddress.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -class Nmc_IpAddress -{ - static public function binaryToString($hexIP) - { - $address = array(); - for($i = 0; $i < 4; $i++) { - $address[] = hexdec(bin2hex($hexIP[$i])); - } - $address = implode('.', $address); - return $address; - } - - static public function intToString($intIP) - { - $address = array(); - for($i = 3; $i >= 0; $i--) { - $address[] = ($intIP >> ($i * 8)) & 0x000000FF; - } - $address = implode('.', $address); - - return $address; - } - - static public function stringToInt($stringIP) - { - $stringIP = explode('.', $stringIP); - $address = 0 - + (intval($stringIP[0]) << 24) - + (intval($stringIP[1]) << 16) - + (intval($stringIP[2]) << 8) - + (intval($stringIP[3]) << 0); - - return $address; - } -} \ No newline at end of file -- GitLab