* this post depends on the work of Fabien Potencier and he’s symfony library together with the work of Francois Zaninotto and he’s sfWebBrowser Plugin for the symfony framework
** if using mozilla browser use firebug and it’s Net function with the “Persist” button ON.

function executeSomeaction(sfWebRequest $r) {

//set some headers, so we'll be ridding mozilla web browser
$b = new sfWebBrowser(array("Accept" => "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language" => "en-gb,en;q=0.8,en-us;q=0.6,fr-fr;q=0.4,en;q=0.2", "Accept-Encoding"=> "gzip,deflate", "Accept-Charset" => "UTF-8,*", "Keep-Alive" => "115", "Connection" => "keep-alive"), 'sfCurlAdapter', array('cookies' => true, 'followlocation' => false, "verbose_log" => true));
//not sure if necessary, but get the "new" asp.net hidden fields
$content = $b->get('http://someweb/someloginform')->getResponseBody();
$view_state = preg_match("/<[^>]*name=\"__VIEWSTATE\"[^>]*value=\"([^\"]+)[^>]*>/i", $content, $vc);
$event_validation = preg_match("/<[^>]*name=\"__EVENTVALIDATION\"[^>]*value=\"([^\"]+)[^>]*>/i", $content, $vd);
//print_r($vd);exit();
$b->post('http://someweb/someformpostpage', array(
'ImageButtonLogin.x' => 26,
'ImageButtonLogin.y' => 15,
'TextBoxPassword' => 'somepassword',
'TextBoxUserName' => 'someusername',
'__EVENTVALIDATION' => $vd[1],
'__VIEWSTATE' => $vc[1]
))
}