Hi all-
I’m trying to use the Intranet Subnet plugin to help map our incoming IPs. (Basically we’re behind a firewall/proxy, so all incoming IPs are showing up as from U.S.-based even though they’re supposed to be overseas.) Unfortunately, it doesn’t seem to be working… I went through and chose some exisiting tracked IPs, converted them, and put them in manually to try and trigger it to show.
public function logIntranetSubNetworkInfo($notification)
{
$visitorInfo =& $notification->getNotificationObject();
$hostname = inet_ntop($visitorInfo['location_ip']);
$myipcomp = ip2long(inet_ntop($visitorInfo['location_ip']));
if ($myipcomp>='2493968850' && $myipcomp<='2493969105') { $hostname ='China'; }
...
Anyway, I looked at the DB table and all the location_ip values are in hex. This doesn’t sound right, as I’m guessing they should be in an IPv4 format, e.g. 175275015…? Should I try and alter my DB table to fix this? :S