Method: PHPCrawler::addBasicAuthentication()



Adds a basic-authentication (username and password) to the list of basic authentications that will be send with requests.
Signature:

public addBasicAuthentication($url_regex, $username, $password)

Parameters:

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

Returns:

bool 

Description:

Example:$crawler->addBasicAuthentication("#http://www\.foo\.com/protected_path/#", "myusername", "mypasswd");
This lets the crawler send the authentication "myusername/mypasswd" with every request for content placed
in the path "protected_path" on the host "www.foo.com".