public addPostData($url_regex, $post_data_array)
$url_regex | string | Regular expression defining the URL(s) the post-data should be send to. |
$post_data_array | array | Post-data-array, the array-keys are the post-data-keys, the array-values the post-values. (like array("post_key1" => "post_value1", "post_key2" => "post_value2") |
bool |
Example$post_data = array("username" => "me", "password" => "my_password", "action" => "do_login");
$crawler->addPostData("#http://www\.foo\.com/login.php#", $post_data);
This example sends the post-values "username=me", "password=my_password" and "action=do_login" to the URL
http://www.foo.com/login.php