I'm making a program for registration on a website.
For this, I use C++Builder and Indy (TIdHTTP).
How it works:
- Program receives registration page via GET and extracts CAPTCHA picture address from it;
- downloads the CAPTCHA (GET) and serves it to user;
- sends the data provided by user to the website in POST request.
Problem: The CAPTCHA code is always incorrect. This must be because somewhere between these three calls to website the CAPTCHA challenge changes.
To prevent this, these requests have to be connected somehow
So I think, some kind of sessions support is needed here...
Please tell me how this can be achieved, in Delphi or C++Builder
EDIT:
I found out that Session ID is stored in a cookie thanks to Runner