| http://www.w3.org/ns/prov#value | - Below is a merged form of all various notes, and a better (and correct) network matching function.<?phpfunction net_match($network, $ip) { // determines if a network in the form of 192.168.17.1/16 or // 127.0.0.1/255.255.255.255 or 10.0.0.1 matches a given ip $ip_arr = explode('/', $network); $network_long = ip2long($ip_arr[0]); $x = ip2long($ip_arr[1]); $mask = long2ip($x) == $ip_arr[1] ? $x : 0x
|