tags:

views:

47

answers:

1

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

A: 

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.

Rowland Shaw