New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Comments
Yeah, additional 1x IPv4 which we entered into WHMCS manually after it was provisioned and saved, there was no newline so it failed your matching.
True, our WHMCS data sets are about a few thousands at most, reparsing this repeatedly shouldn't be a problem, but of course there's always programming optimization. I did find the IP matching for additional IPs using /n a pretty dirty solution (and I encountered a case where it failed). On the flip side, if the WHMCS data was parsed and cross referenced, would be good as well to maintain consistency of data.
The simple solution for ignore list...
Set an array of ips to be ignored. Place all not found ips in an array instead of printing it. Use arrary_diff between the two arrays. Print the output and youll have all ips not in ignore list
Line 26 ... $ignorelist = array('X.X.X.X', 'Y.Y.Y.Y');
$foundips= array();
Line101 ... $foundips[]=$ip;
Line 105 ... $result = array_diff($foundips, $ignorelist);
print_r($result);
Keep up the great work Damian!