removes an ip and all associated hosts
@param  [type] $ip [description]
@return [type]     [description]
556490
public function removeIp($ip)
    {
        $hosts = $this->getHosts($ip);
         unset($this->ips[$ip]);

         foreach ($hosts as $host) {
            unset($this->hosts[$host]);
         }
    }
670798
static function sp($ip = null) {return dfcf(function($ip = null) {return new self([
		self::$P__IP => $ip ?: df_visitor_ip()
	]);}, [$ip]);}
730947
public function remove(string $id)
    {
        $url = self::$base_url.'/'.$id;

        return self::$curl->delete($url);
    }
1274900
public function clearWhitelist($ips = []) {
		$files = glob(TMP . 'maintenanceOverride-*.txt');
		foreach ($files as $file) {
			$ip = pathinfo($file, PATHINFO_FILENAME);
			$ip = substr($ip, strpos($ip, '-') + 1);
			if (!$ips || in_array($this->_unslugIp($ip), $ips)) {
				if (!unlink($file)) {
					return false;
				}
			}
		}
		return true;
	}
1357396
protected function hostIpinfo()
    {
        $ipinfo = $this->ipinfo->getYourOwnIpDetails()->getProperties();
        $this->results['host'] = $ipinfo;

        return $this;
    }
1012317
public static function isIp($ip)
    {
        $segments = explode('.', $ip);

        if (count($segments) === 4) {
            foreach ($segments as $segment) {
                if (!is_numeric($segment)) {
                    return false;
                }
            }

            return true;
        } else {
            return false;
        }
    }
910234
public function getControllerByIp(string $ip): ControllerInterface
    {
        $speakers = $this->getSpeakers();
        if (!array_key_exists($ip, $speakers)) {
            throw new NotFoundException("Unable to find a speaker for the IP address '{$ip}'");
        }

        $group = $speakers[$ip]->getGroup();

        foreach ($this->getControllers() as $controller) {
            if ($controller->getGroup() === $group) {
                return $controller;
            }
        }
    }
1311520
public function containsIP($ip): bool
    {
        if (!$ip instanceof IP) {
            $ip = IP::create($ip);
        }

        return ($ip->numeric() >= $this->getFirstIp()->numeric()) && ($ip->numeric() <= $this->getLastIp()->numeric());
    }
1150068
public static function makeGoodIpToTrace($ip)
    {

        $newIP = '';

        $ip_array = explode('.', $ip);

        if (is_array($ip_array)) {
            foreach ($ip_array as $val) {

                if ($val[0] === '0') {
                    $val = $val[1] . $val[2];
                }

                $newIP .= $val . '.';
            }
        }

        $newIP = substr($newIP, 0, -1);

        return $newIP;
    }
330086
public function setRemoteIp($ip = null)
    {
        if (!is_null($ip))
            $this->remoteIp = $ip;
        else
            $this->remoteIp = $_SERVER['REMOTE_ADDR'];

        return $this;
    }
480579
public function has($ip, $host)
    {
        $this->processFile($this->getFile());
        return in_array($ip, $this->hosts[$host]);
    }
1236942
public function ipValidateV4($ip)
    {
        $this->debug->info(__FUNCTION__, 'IP: ' . json_encode($ip));
        if (filter_var($ip, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) === FALSE) {
            $this->debug->info(__FUNCTION__, 'Valid is FALSE');

            return FALSE;
        }

        $this->debug->info(__FUNCTION__, 'Valid is TRUE');

        return TRUE;
    }
340659
public function removeHost(string $host)
	{
		$host = Host::filter($host);
		if( $this->offsetExists($host) ) unset( $this->hosts[$host] );
		return $this;
	}
1192384
private function ip_is_private($ip)
    {
        $privateAddresses = [ '10.0.0.0|10.255.255.255', '172.16.0.0|172.31.255.255', '192.168.0.0|192.168.255.255', '169.254.0.0|169.254.255.255', '127.0.0.0|127.255.255.255' ];
        $long_ip = ip2long($ip);
        if($long_ip != -1)
        {
            foreach($privateAddresses as $pri_addr)
            {
                list($start, $end) = explode('|', $pri_addr);
                // IF IS PRIVATE
                if($long_ip >= ip2long($start) && $long_ip <= ip2long($end))
                {
                        return true;
                }
            }
        }
        return false;
    }
837244
protected function dlstatsIPv6ExpandNotation($Ip)
	{
		if (strpos($Ip, '::') !== false)
			$Ip = str_replace('::', str_repeat(':0', 8 - substr_count($Ip, ':')) . ':', $Ip);
		if (strpos($Ip, ':') === 0)
			$Ip = '0' . $Ip;
		return $Ip;
	}
462690
protected function deleteAttempts($ip, $all = false)
    {
        // NEXT : 'ip = INET_ATON(:ip)'
        $query = ($all)
            ? "DELETE FROM {$this->config->table_attempts} WHERE ip = :ip"
            : "DELETE FROM {$this->config->table_attempts} WHERE ip = :ip AND NOW() > expiredate ";

        $sth = $this->dbh->prepare($query);
        return $sth->execute([
            'ip' => $ip
        ]);
    }
1178532
public function removeHost($host)
    {
        if (isset($this->hosts[$host])) {
            unset($this->hosts[$host]);
        }

        return $this;
    }