2

我正在使用 snoopy 在另一个网站的 .aspx 页面上提交表单。我已经从该表单中获取了所有标题/cookies 和值,并将其传递给带有 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);

谢谢

4

0 回答 0