public function checkIP($UserIP = false)
	{
	    // Check if IP present
	    if ($UserIP === false)
	    {
	        $tempIP = $this->dlstatsGetUserIP();
	        if ($tempIP !== false)
	        {
	            $this->IP = $tempIP;
	        }
	        else
	        {
	            return false; // No IP, no search.
	        }
	    }
	    else
	    {
	        $this->IP = $UserIP;
	    }
	    // IPv4 or IPv6 ?
	    switch ($this->checkIPVersion($this->IP))
	    {
	    	case "IPv4":
	    	    if ($this->checkIPv4($this->IP) === true)
	    	    {
	    	        $this->IP_Filter = true;
	    	        return $this->IP_Filter;
	    	    }
	    	    break;
	    	case "IPv6":
	    	    if ($this->checkIPv6($this->IP) === true)
	    	    {
	    	        $this->IP_Filter = true;
	    	        return $this->IP_Filter;
	    	    }
	    	    break;
	    	default:
	    	    $this->IP_Filter = false;
	    	    return $this->IP_Filter;
	    	    break;
	    }
	    $this->IP_Filter = false;
	    return $this->IP_Filter;
	}
public function checkIP($UserIP = false)
	{
	    // Check if IP present
	    if ($UserIP === false)
	    {
	        $tempIP = $this->dlstatsGetUserIP();
	        if ($tempIP !== false)
	        {
	            $this->IP = $tempIP;
	        }
	        else
	        {
	            return false; // No IP, no search.
	        }
	    }
	    else
	    {
	        $this->IP = $UserIP;
	    }
	    // IPv4 or IPv6 ?
	    switch ($this->checkIPVersion($this->IP))
	    {
	    	case "IPv4":
	    	    if ($this->checkIPv4($this->IP) === true)
	    	    {
	    	        $this->IP_Filter = true;
	    	        return $this->IP_Filter;
	    	    }
	    	    break;
	    	case "IPv6":
	    	    if ($this->checkIPv6($this->IP) === true)
	    	    {
	    	        $this->IP_Filter = true;
	    	        return $this->IP_Filter;
	    	    }
	    	    break;
	    	default:
	    	    $this->IP_Filter = false;
	    	    return $this->IP_Filter;
	    	    break;
	    }
	    $this->IP_Filter = false;
	    return $this->IP_Filter;
	}
public function checkIP ( $ UserIP = false ) { // Check if IP present if ( $ UserIP === false ) { $ tempIP = $ this -> dlstatsGetUserIP ( ) ; if ( $ tempIP !== false ) { $ this -> IP = $ tempIP ; } else { return false ; // No IP, no search. } } else { $ this -> IP = $ UserIP ; } // IPv4 or IPv6 ? switch ( $ this -> checkIPVersion ( $ this -> IP ) ) { case "IPv4" : if ( $ this -> checkIPv4 ( $ this -> IP ) === true ) { $ this -> IP_Filter = true ; return $ this -> IP_Filter ; } break ; case "IPv6" : if ( $ this -> checkIPv6 ( $ this -> IP ) === true ) { $ this -> IP_Filter = true ; return $ this -> IP_Filter ; } break ; default : $ this -> IP_Filter = false ; return $ this -> IP_Filter ; break ; } $ this -> IP_Filter = false ; return $ this -> IP_Filter ; }
IP Check
Set IP, detect the IP version and calls the method CheckIPv4 respectively CheckIPv6.

@param string   User IP, optional for tests
@return boolean true when bot found over IP
@access protected
IP Check Set IP detect the IP version and calls the method CheckIPv4 respectively CheckIPv6 .