CImage.php
public function isRemoteSourceOnWhitelist($src)
    {
        if (is_null($this->remoteHostWhitelist)) {
            $this->log("Remote host on whitelist not configured - allowing.");
            return true;
        }

        $whitelist = new CWhitelist();
        $hostname = parse_url($src, PHP_URL_HOST);
        $allow = $whitelist->check($hostname, $this->remoteHostWhitelist);

        $this->log(
            "Remote host is on whitelist: "
            . ($allow ? "true" : "false")
        );
        return $allow;
    }
public function isRemoteSourceOnWhitelist($src)
    {
        if (is_null($this->remoteHostWhitelist)) {
            $this->log("Remote host on whitelist not configured - allowing.");
            return true;
        }

        $whitelist = new CWhitelist();
        $hostname = parse_url($src, PHP_URL_HOST);
        $allow = $whitelist->check($hostname, $this->remoteHostWhitelist);

        $this->log(
            "Remote host is on whitelist: "
            . ($allow ? "true" : "false")
        );
        return $allow;
    }
public function isRemoteSourceOnWhitelist ( $ src ) { if ( is_null ( $ this -> remoteHostWhitelist ) ) { $ this -> log ( "Remote host on whitelist not configured - allowing." ) ; return true ; } $ whitelist = new CWhitelist ( ) ; $ hostname = parse_url ( $ src , PHP_URL_HOST ) ; $ allow = $ whitelist -> check ( $ hostname , $ this -> remoteHostWhitelist ) ; $ this -> log ( "Remote host is on whitelist: " . ( $ allow ? "true" : "false" ) ) ; return $ allow ; }
Check if the hostname for the remote image, is on a whitelist,
if the whitelist is defined.

@param string $src the remote source.

@return boolean true if hostname on $src is in the whitelist, else false.
Check if the hostname for the remote image is on a whitelist if the whitelist is defined .