public static function getHeaderValue($header, $directive)
  {
    preg_match("#[\r\n]".$directive.":(.*)[\r\n\;]# Ui", $header, $match);
    
    if (isset($match[1]) && trim($match[1]) != "")
    {
      return trim($match[1]);
    }
    
    else return null;
  }