0

I've been trying for many days to do that post request, but actually it doesn't work, so let me explain: I've to login onto a website using HttpWebRequest (the website is an HTTPS, but it doesn't matter) so I picked the post string from the post request, but it has an alphanumeric random generated string inside, which changes on every login request and I don't understand how can I get it. That's an example of the post string:

tp=f8279b6fedd63d2f6f6b483c4c6bf42c&cir=7630440&username=[username here]&password=[password here]&reopen_account=on&remember_me=on&tz=120%21120&nid=&action=login

The bold string changes on every login and that's my problem: how can I login on this site with a web request?. Thank you and sorry for my, maybe, bad english.

zx485
  • 28,498
  • 28
  • 50
  • 59
simo-r
  • 733
  • 1
  • 9
  • 13
  • Take a look at this: http://stackoverflow.com/questions/1055853/how-to-parse-httpwebresponse-headers-keys-for-a-set-cookie-session-id-returned – Shannon Holsinger Sep 16 '16 at 15:33
  • Thank you, I tried what you linked and i thought was the right thing but it didn't work but maybe the solution is something about cookie. Thank you again anyway! – simo-r Sep 16 '16 at 20:29
  • That post string is coming from the initial GET request that generated the login page. The best way is to use the Debug tools of your browser, enable the net tab, and see what requests the browser is sending. Then replicate those requests as faithfuly as possible using code. – feroze Sep 18 '16 at 05:59

0 Answers0