Returns a url safe from referers

Expected Params:
url string A url to be filtered through hiderefer.com

@return string  The specified url filtered through hiderefer.com
485121
public function noReferer()
    {
        if ($this->getParameter('url') == null)
            return;

        if ($this->getParameter('service') == null)
            return "http://hiderefer.com/?" . $this->getParameter('url');

        return $this->getParameter('service') . $this->getParameter('url');
    }
673295
public function getReferrer()
    {
        if (isset($this->_referrer)) {
            return $this->_referrer;
        }
        return $this->_referrer = isset($_SERVER['HTTP_REFERER']) ? $_SERVER['HTTP_REFERER'] : null;
    }
1294331
private static function guessAbsoluteURL () {
        $scheme = 'http';
        $host = 'localhost';

        if (isset($_SERVER['REQUEST_SCHEME'])) {
            $scheme = $_SERVER['REQUEST_SCHEME'];
        }

        if (isset($_SERVER['HTTP_HOST'])) {
            $host = $_SERVER['HTTP_HOST'];
        }

        return $scheme . '://' . $host . '/';
    }
457708
protected static function getRequestUrl()
    {
        $hostname = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : (isset($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : null);

        if(isset($hostname))
        {
            $protocol = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';

            if(!isset($_SERVER['REQUEST_URI']))
            {
                if(isset($_SERVER['QUERY_STRING']))
                {
                    return $protocol . '://' . $hostname . $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
                }
                else
                {
                    return $protocol . '://' . $hostname . $_SERVER['PHP_SELF'];
                }
            }
            else
            {
                return $protocol . '://' . $hostname . $_SERVER['REQUEST_URI'];
            }
        }
        else
        {
            return null;
        }
    }
168912
public function getSecureUrl()
    {
        $defaultUrl = $this->getTestMode() === false
            ? $this->prodSecureHost
            : $this->testSecureHost;
        return $this->parameters->get('secureUrl', $defaultUrl);
    }
938667
public function getUrlBase() : string
    {
        $url = sprintf('%s://%s', $this->getScheme(), $this->host);
        $isStandardPort = ($this->port === ($this->isSecure ? 443 : 80));

        return $isStandardPort ? $url : $url . ':' . $this->port;
    }
862051
public function getCurrentUrl()
    {
        $oUtilsServer = \OxidEsales\Eshop\Core\Registry::getUtilsServer();

        $aServerParams["HTTPS"] = $oUtilsServer->getServerVar("HTTPS");
        $aServerParams["HTTP_X_FORWARDED_PROTO"] = $oUtilsServer->getServerVar("HTTP_X_FORWARDED_PROTO");
        $aServerParams["HTTP_HOST"] = $oUtilsServer->getServerVar("HTTP_HOST");
        $aServerParams["REQUEST_URI"] = $oUtilsServer->getServerVar("REQUEST_URI");

        $sProtocol = "http://";

        if (isset($aServerParams['HTTPS']) && (($aServerParams['HTTPS'] == 'on' || $aServerParams['HTTPS'] == 1))
            || (isset($aServerParams['HTTP_X_FORWARDED_PROTO']) && $aServerParams['HTTP_X_FORWARDED_PROTO'] == 'https')
        ) {
            $sProtocol = 'https://';
        }

        return $sProtocol . $aServerParams['HTTP_HOST'] . $aServerParams['REQUEST_URI'];
    }
356850
public function getUrl(): string
    {
        $url = $this->url;

        if ($this->getMethod() == self::GET) {
            if (count($this->params) > 0) {
                $params = http_build_query($this->getParams());

                if (strpos('?', $url) !== false && substr($url, -1) != '?') {
                    // just add "&"
                    $url .= $params;
                } else {
                    $url .= '?' . $params;
                }
            }
        }
        return $url;
    }
973582
protected function evaluateSafenessAsURL()
	{
		$regexpInfo = RegexpParser::parse($this->vars['regexp']);

		// Match any number of "(" optionally followed by "?:"
		$captureStart = '(?>\\((?:\\?:)?)*';

		// Regexps that start with a fixed scheme are considered safe. As a special case, we
		// allow the scheme part to end with a single ? to allow the regexp "https?"
		$regexp = '#^\\^' . $captureStart . '(?!data|\\w*script)[a-z0-9]+\\??:#i';
		if (preg_match($regexp, $regexpInfo['regexp'])
		 && strpos($regexpInfo['modifiers'], 'm') === false)
		{
			$this->markAsSafeAsURL();

			return;
		}

		// Test whether this regexp could allow any character that's disallowed in URLs
		$regexp = RegexpParser::getAllowedCharacterRegexp($this->vars['regexp']);
		foreach (ContextSafeness::getDisallowedCharactersAsURL() as $char)
		{
			if (preg_match($regexp, $char))
			{
				return;
			}
		}

		$this->markAsSafeAsURL();
	}
624098
public function getNormalizedUrl() {
		$parts = parse_url( $this->url );

		$scheme = isset( $parts['scheme'] ) ? $parts['scheme'] : 'http';
		$port = isset( $parts['port'] ) ?
			$parts['port'] : ( $scheme === 'https' ? '443' : '80' );
		$host = isset( $parts['host'] ) ? strtolower( $parts['host'] ) : '';
		$path = isset( $parts['path'] ) ? $parts['path'] : '';

		if ( ( $scheme === 'https' && $port != '443' ) ||
			( $scheme === 'http' && $port != '80' )
		) {
			$host = "{$host}:{$port}";
		}
		return "{$scheme}://{$host}{$path}";
	}
443269
public SafeUrl toSafeUrl() {
    Preconditions.checkState(
        getContentKind() == ContentKind.URI,
        "toSafeUrl() only valid for SanitizedContent of kind URI, is: %s",
        getContentKind());
    return UncheckedConversions.safeUrlFromStringKnownToSatisfyTypeContract(getContent());
  }
1040378
public function getRef()
    {
        if (is_null($this->ref)) {
            $tags = $this->tags;
            sort($tags);
            $this->ref = md5(implode('-', $tags));
        }
        return $this->ref;
    }
336742
public function getUrl()
    {
        $scheme = $this->scheme!=null ? $this->scheme . '://' : MString::EMPTY_STRING;
        $host = $this->host!=null ? $this->host : MString::EMPTY_STRING;
        $port = $this->port!=null ? ':' . $this->port : MString::EMPTY_STRING;
        $user = $this->user!=null ? $this->user : MString::EMPTY_STRING;
        $pass = $this->password!=null ? ':' . $this->password : MString::EMPTY_STRING;
        $pass = ($user||$pass) ? "$pass@" : MString::EMPTY_STRING;
        $path = $this->path!=null ? $this->path : MString::EMPTY_STRING;
        $query = $this->query!=null ? '?' . $this->query : MString::EMPTY_STRING;
        $fragment = $this->fragment!=null ? '#' . $this->fragment : MString::EMPTY_STRING;

        return $scheme . $user . $pass . $host . $port . $path . $query . $fragment;
    }
82708
protected function _getUrlExcludes() {
        $urls = Mage::getStoreConfig('turpentine_vcl/urls/url_blacklist');
        return implode('|', array_merge(array($this->_getAdminFrontname(), 'api'),
            Mage::helper('turpentine/data')->cleanExplode(PHP_EOL, $urls)));
    }
819819
private function filter_get_referr_var( $params ){

		$referer = parse_url( $_SERVER['HTTP_REFERER'] );
		if( !empty( $referer['query'] ) ){
			parse_str( $referer['query'], $get_vars );
			if( isset( $get_vars[$params] ) ){
				return wp_slash( $get_vars[$params] );
			}
		}
		return $params;
	}
325856
public function referer($default = null, $local = false) {
		if ($ref = $this->env('HTTP_REFERER')) {
			if (!$local) {
				return $ref;
			}
			$url = parse_url($ref) + ['path' => ''];
			if (empty($url['host']) || $url['host'] === $this->env('HTTP_HOST')) {
				$ref = $url['path'];
				if (!empty($url['query'])) {
					$ref .= '?' . $url['query'];
				}
				if (!empty($url['fragment'])) {
					$ref .= '#' . $url['fragment'];
				}
				return $ref;
			}
		}
		return ($default !== null) ? $default : '/';
	}
300017
public function getURL(): ?string
    {
        if ($this->base !== null) {
            $list = [];
            $queryList = $this->query->getList();
            foreach ($queryList as $queryItem) {
                $list[$queryItem->name] = $queryItem->value;
            }
            return $this->base . implode('/', array_map('urlencode', explode('/', (string) $this->path))) . (empty($list) ? '' : '?' . http_build_query($list));
        }
        return null;
    }