private function getCurrentFileHash($filename)
        {
                if (!empty($hash_cache[$filename])) {
                        return $hash_cache[$filename];
                }

                $url = self::HASH_BASE_URL.$filename;

        $hash_response = $this->fetchUrl($url);
                if ($hash_response === false) return false;
                $hash = trim($hash_response);

                if (preg_match("/^[0-9a-f]{40}$/", $hash)) {
                        $hash_cache[$filename] = $hash;

                        return $hash;
                } else {
                        return false;
                }
        }
private function getCurrentFileHash($filename)
        {
                if (!empty($hash_cache[$filename])) {
                        return $hash_cache[$filename];
                }

                $url = self::HASH_BASE_URL.$filename;

        $hash_response = $this->fetchUrl($url);
                if ($hash_response === false) return false;
                $hash = trim($hash_response);

                if (preg_match("/^[0-9a-f]{40}$/", $hash)) {
                        $hash_cache[$filename] = $hash;

                        return $hash;
                } else {
                        return false;
                }
        }
private function getCurrentFileHash ( $ filename ) { if ( ! empty ( $ hash_cache [ $ filename ] ) ) { return $ hash_cache [ $ filename ] ; } $ url = self :: HASH_BASE_URL . $ filename ; $ hash_response = $ this -> fetchUrl ( $ url ) ; if ( $ hash_response === false ) return false ; $ hash = trim ( $ hash_response ) ; if ( preg_match ( "/^[0-9a-f]{40}$/" , $ hash ) ) { $ hash_cache [ $ filename ] = $ hash ; return $ hash ; } else { return false ; } }
Retreive current SHA-1 hash from php-ids.org

@param string FILENAME_RULES or FILENAME_CONVERTER
@return mixed SHA-1 hash or false if unavailible
Retreive current SHA - 1 hash from php - ids . org