protected function generateFingerprint()
    {
        // Assume empty fingerprint
        $fingerprint = '';

        // Who is requesting (fingerprint client)
        $headers = getallheaders();

        // Get arguments
        $arguments   = func_get_args();
        $arguments[] = $_SERVER['REMOTE_ADDR'];
        $arguments[] = (isset($headers['USER_AGENT'])) ? $headers['USER_AGENT'] : null;
        $arguments[] = (isset($headers['ACCEPT'])) ? $headers['ACCEPT'] : null;
        $arguments[] = (isset($headers['ACCEPT_LANGUAGE'])) ? $headers['ACCEPT_LANGUAGE'] : null;
        $arguments[] = (isset($headers['ACCEPT_ENCODING'])) ? $headers['ACCEPT_ENCODING'] : null;
        $arguments[] = $this->translateToTemplateFilename();

        foreach ($arguments as $argument) {
            $fingerprint .= serialize($argument);
        }

        return md5($fingerprint);
    }
protected function generateFingerprint()
    {
        // Assume empty fingerprint
        $fingerprint = '';

        // Who is requesting (fingerprint client)
        $headers = getallheaders();

        // Get arguments
        $arguments   = func_get_args();
        $arguments[] = $_SERVER['REMOTE_ADDR'];
        $arguments[] = (isset($headers['USER_AGENT'])) ? $headers['USER_AGENT'] : null;
        $arguments[] = (isset($headers['ACCEPT'])) ? $headers['ACCEPT'] : null;
        $arguments[] = (isset($headers['ACCEPT_LANGUAGE'])) ? $headers['ACCEPT_LANGUAGE'] : null;
        $arguments[] = (isset($headers['ACCEPT_ENCODING'])) ? $headers['ACCEPT_ENCODING'] : null;
        $arguments[] = $this->translateToTemplateFilename();

        foreach ($arguments as $argument) {
            $fingerprint .= serialize($argument);
        }

        return md5($fingerprint);
    }
protected function generateFingerprint ( ) { // Assume empty fingerprint $ fingerprint = '' ; // Who is requesting (fingerprint client) $ headers = getallheaders ( ) ; // Get arguments $ arguments = func_get_args ( ) ; $ arguments [ ] = $ _SERVER [ 'REMOTE_ADDR' ] ; $ arguments [ ] = ( isset ( $ headers [ 'USER_AGENT' ] ) ) ? $ headers [ 'USER_AGENT' ] : null ; $ arguments [ ] = ( isset ( $ headers [ 'ACCEPT' ] ) ) ? $ headers [ 'ACCEPT' ] : null ; $ arguments [ ] = ( isset ( $ headers [ 'ACCEPT_LANGUAGE' ] ) ) ? $ headers [ 'ACCEPT_LANGUAGE' ] : null ; $ arguments [ ] = ( isset ( $ headers [ 'ACCEPT_ENCODING' ] ) ) ? $ headers [ 'ACCEPT_ENCODING' ] : null ; $ arguments [ ] = $ this -> translateToTemplateFilename ( ) ; foreach ( $ arguments as $ argument ) { $ fingerprint .= serialize ( $ argument ) ; } return md5 ( $ fingerprint ) ; }
Generates and returns fingerprint for the current instance & request.

@author Benjamin Carl <opensource@clickalicious.de>

@return string The generated fingerprint
Generates and returns fingerprint for the current instance & request .