D
D
David2016-09-22 16:23:01
PHP
David, 2016-09-22 16:23:01

Captcha. Manual recognition by user?

Hello. There is a service for checking the warranty of apple equipment. I need to check the warranty before placing an order. The idea is this: captcha image is base64. When a user enters imei, I want to get a picture from the apple website and show it to the user so that he recognizes it. I don’t know much about parsing, please tell me how real is my idea?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Andrew, 2016-09-22
@ntzch

That is, you want to integrate into your site the check of the right to service from the given site? I didn’t understand the intricacies themselves with regards to a specific example, since there was no such task, but on that service the picture, like the form itself, is created through JS, that is, just taking it and tearing it out through php will not work. In some cases, in similar situations, it turns out to get inside the JS file, read the necessary data and send the necessary request to the server, but how realistic is this in this case (although at first glance it seems quite possible) and whether you have enough skills - I don’t I know.
PS Do not forget that the captcha for each page load will be different, therefore, you will have to understand this issue.

S
Stepan Pyzhov, 2016-09-23
@turintomsk

Captcha usually works by setting cookies on the user's side, i.e. you need to ask for the next picture for the current user, and remember his session on the service side.
This can be done through curl requests using the appropriate settings.
Look aside curl_setopt : CURLOPT_COOKIEFILE, CURLOPT_COOKIEJAR.
Keep in mind that:
* the user may make mistakes;
* the user can refuse to enter;
* captcha may become outdated on a third-party service;
* for a third-party service, it is necessary to introduce yourself as a browser;
* each CURLOPT_COOKIEJAR must be unique for the current user session.
In this particular example, you will have to emulate an AJAX request.
You will have to tinker with this, but it is also possible. In short:
1) we request a page with empty cookies
2) we form a request through "ajax" with spoof headers.
I advise you to test through vpn or dynamic ip, otherwise you will soon be blacklisted.

T
tommy_13, 2016-09-30
@tommy_13

open browser console. See what is sent and repeat the same

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question