public static function getRedirectURLFromHeader(&$header)
  {
    // Get redirect-link from header
    preg_match("/((?i)location:|content-location:)(.{0,})[\n]/", $header, $match);
    
    if (isset($match[2]))
    {
      $redirect = trim($match[2]);
      return $redirect;
    }
    else return null;
  }