public addBasicAuthentication($url_regex, $username, $password)
| $url_regex | string | Regular-expression defining the URL(s) the authentication should be send to. |
| $username | string | The username |
| $password | string | The password |
| bool |
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".