I have been screenscraping several websites for my company.
I'm facing a problem now with .aspx pages:

* The form that needs to be submitted is in index.aspx
* The POST variables need to be sent to the same page using CURL, that is index.php
* I got an error, invalid viewstate
* Now, i tried to scrape VIEWSTATE variable & posted it back to index.php
* Again i got the same error, invalid VIEWSTATE

Please help me in submitting VIEWSTATE variable successfully. What should be done??

    @
    Not solved yet...
    someone help me

      depending on the site and how its web.config is setup several things could be going on that are causing your issue...

      what i might try todo is curl the site... scrape the viewstate.... curl the site re-scrape the viewstate and compare the two... if they are different then you might need to properly setup the curl cookie options to allow the aspx site to give you a viewstate cookie that curl can keep... that way when you scrape the viewstate and make another curl call you can use the original viewstate your session was assigned

        Write a Reply...