Answer the question
In order to leave comments, you need to log in
How to parse a captcha that is updated on every request?
Usually captcha is processed simply. They look for the output of the image in the page code, save it (or a link to it) and send it to the service for recognition / recognize it themselves.
But there is a type of captcha that is updated on every request.
For example :
plasma-lab.com/public/controls/turingImage.ashx
if we get the page (and the image address) with some kind of curl, and save the image using the received link, these will be two different images. Each new request to the captcha address will return a new image.
Question. Does this problem have a solution at all using php? Maybe there is some way to receive everything that the enemy server gives us into some stream and "tear" the picture out of it?
Of course, there is a solution to work through managing your own browser (using JavaScript, the WebBrowser component) or something like that. But this solution is ugly.
Answer the question
In order to leave comments, you need to log in
Refer from the script directly to plasma-lab.com/public/controls/turingImage.ashx the server will give you the captcha and save it for your session, so save the cookies too. Send a picture to anti-captcha, get a response. And send the desired request with saved cookies and decrypted captcha, whether it's authorization or some kind of action that you need there.
This is a standard captcha and working with it is standard, as Alexander Galanin
described.
Understand the logic of such captchas:
The script generated a picture, it must save somewhere that I gave such and such a captcha text to such and such a patient. The "patient" identifier is a cookie or session.
The algorithm is approximately the following:
- access the captcha script
- save the picture and all cookies, including the session
- recognize the captcha
- submit the desired form on the site with the saved cookies.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question