Scraping .NET website I keep getting "Unable to validate data"
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.
精彩评论