public static function getURIContent($uri, $request_user_agent_string = null, $throw_exception = false)
  {
    $UriParts = PHPCrawlerUrlPartsDescriptor::fromURL($uri);
    
    $error_str = "";
    
    // If protocol is "file"
    if ($UriParts->protocol == "file://")
    {
      $file = preg_replace("#^file://#", "", $uri);
      
      if (file_exists($file) && is_readable($file))
        return file_get_contents($file);
      else
        $error_str = "Error reading from file '".$file."'";
    }
    
    // If protocol is "http" or "https"
    elseif ($UriParts->protocol == "http://" || $UriParts->protocol == "https://")
    {
      $uri = self::normalizeURL($uri);
      $Request = new PHPCrawlerHTTPRequest();
      $Request->setUrl(new PHPCrawlerURLDescriptor($uri));
      
      if ($request_user_agent_string !== null)
        $Request->userAgentString = $request_user_agent_string;
      
      $DocInfo = $Request->sendRequest();
      
      if ($DocInfo->received == true)
        return $DocInfo->source;
      else
        $error_str = "Error reading from URL '".$uri."'";
    }
    
    // if protocol is not supported
    else
    {
      $error_str = "Unsupported protocol-type '".$UriParts->protocol."'";
    }
    
    // Throw exception?
    if ($throw_exception == true)
      throw new Exception($error_str);
    
    return null;
  }