function FindHeaders($name) {
        $result = array();
        //if ($name[0]<>'/') $name='/^'.$name.'$/';//If regex not found convert it to an "exact phrase" regex as default
        //Return header directly if not written as regular expression (separated for speed)
        if ($name[0] <> '/') {
            if (array_key_exists($name, $_SERVER)){
                $result[$name] = $_SERVER[$name];
            }
        }else {
            //Regular expression headers search
            foreach ($_SERVER as $key => $value) {
                if (preg_match($name, $key, $match)){
                    $result[$key] = $value;
                }
            }
        }
        return $result;
    }