Changeset 695 for trunk/Common/NetworkAddress.php
- Timestamp:
- Sep 19, 2014, 7:25:33 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Common/NetworkAddress.php
r548 r695 19 19 function AddressToString() 20 20 { 21 return(implode('.', array(($this->Address >> 24) & 255, ($this->Address >> 16) & 255, ($this->Address >> 8) & 255, ($this->Address & 255))));21 return(implode('.', array(($this->Address >> 24) & 255, ($this->Address >> 16) & 255, ($this->Address >> 8) & 255, ($this->Address & 255)))); 22 22 } 23 23 … … 57 57 } 58 58 } 59 60 class NetworkAddressIPv6 61 { 62 var $Address; 63 var $Prefix; 64 65 function __construct() 66 { 67 $this->Address = 0; 68 $this->Prefix = 0; 69 } 70 71 function AddressToString() 72 { 73 return(inet_ntop($this->Address)); 74 } 75 76 function AddressFromString($Value) 77 { 78 $this->Address = inet_pton($Value); 79 } 80 81 }
Note:
See TracChangeset
for help on using the changeset viewer.