开发者

Scraping .NET website I keep getting "Unable to validate data"

开发者 https://www.devze.com 2023-01-05 15:45 出处:网络
I\'m trying to php/curl scrape data from an .NET site (those with __VIEWSTATE, __EVENTVALIDATION). I monitor headers and post vars using Tamper Data so I\'m pretty sure I haven\'t missed anything. My

I'm trying to php/curl scrape data from an .NET site (those with __VIEWSTATE, __EVENTVALIDATION). I monitor headers and post vars using Tamper Data so I'm pretty sure I haven't missed anything. My approach is to micmic the post back when 开发者_如何学编程the user click on one of the links and parse the response. But the response I'm getting is a page redirect to "Unable to validate data".

What am I missing?

Regards,

Marco


When sending the request across, you'll need to specify the values for __VIEWSTATE & __EVENTVALIDATION that were on the page that you're faking the user interaction from. This might mean that you have to make a standard GET request for the initial page, grab those variables, combine with your other values for your other post bits, before POSTing the whole lot back.

0

精彩评论

暂无评论...
验证码 换一张
取 消