libs/PHPCrawlerUserSendDataCache.class.php
public function addBasicAuthentication($url_regex, $username, $password)
  {
    // Check regex
    $regex_okay = PHPCrawlerUtils::checkRegexPattern($url_regex);
    
    if ($regex_okay == true)
    {
      // Add authentication to basic_authentications-array
      $tmp = array();
      $tmp["url_regex"] = $url_regex;
      $tmp["username"] = $username;
      $tmp["password"] = $password;
      
      $this->basic_authentications[] = $tmp;
      return true;
    }
    else return false;
  }
public function addBasicAuthentication($url_regex, $username, $password)
  {
    // Check regex
    $regex_okay = PHPCrawlerUtils::checkRegexPattern($url_regex);
    
    if ($regex_okay == true)
    {
      // Add authentication to basic_authentications-array
      $tmp = array();
      $tmp["url_regex"] = $url_regex;
      $tmp["username"] = $username;
      $tmp["password"] = $password;
      
      $this->basic_authentications[] = $tmp;
      return true;
    }
    else return false;
  }
Adds a basic-authentication (username and password) to the list of authentications that will be send
with requests.

@param string $url_regex Regular expression defining the URL(s) the authentication should be send to.
@param string $username  The username
@param string $password  The password

@return bool