Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


SolusVM/WHMCS IP Auditor - Page 2
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.

SolusVM/WHMCS IP Auditor

2»

Comments

  • @Damian said: Was this for a single IP?

    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.

    @Damian said: Indeed, I considered this, however, I chose to query for every IP instead of using PHP for sorting. Reason was that, logically, MySQL should be better at answering queries with data, since that's what it's built for, than PHP would be at sorting data. I don't know if it's truly slower.

    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.

  • bdtechbdtech Member
    edited March 2013

    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!

Sign In or Register to comment.