我正在使用snoopy在另一个网站的.aspx页面上提交表单。我已经从该表单中获取了所有标题/ cookie和值,并将其传递给带有Snoopy的表单。但是我会得到“viewstate”的错误,即“Viewstate无效”。我已从表单的源代码中复制了视图状态字段并将其传递。但是,它仍然是同样的错误。
任何人都可以告诉我如何在该.aspx表单上提交表单。以下是我正在使用的代码:
$snoopy->referer="http://www.URL.com/default.aspx";
$snoopy->agent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)";
$snoopy->rawheaders['Content-Type']="application/x-www-form-urlencoded";
$snoopy->rawheaders['Cache-Control']="private";
$snoopy->cookies['ASP.NET_SessionId']="adeqeteqerqrqqeq";
$submit_vars['__EVENTTARGET']="";
$submit_vars['__EVENTARGUMENT']="";
$submit_vars['__LASTFOCUS']="";
$submit_vars['__VIEWSTATE']=urldecode("/qqeaddgqradeapoioq==");
$submit_vars['__EVENTVALIDATION']=urldecode("/addafadfaerttq/aa/yqea");
$submit_vars['ctl00$ContentPlaceHolder1$lstc']="1";
$submit_vars['ctl00$ContentPlaceHolder1$lstm']="11";
$submit_vars['ctl00$ContentPlaceHolder1$lstce']="16";
$submit_vars['ctl00$ContentPlaceHolder1$lstt']="18289";
$submit_vars['ctl00$ContentPlaceHolder1$btnSad']="Submit";
$submit_url = "http://www.URL.com/Default.aspx";
$snoopy->submit($submit_url,$submit_vars);
由于