Answer the question
In order to leave comments, you need to log in
Curl manual captcha entry?
Good day, on the site *** there is authorization through the form with captcha, how to manually enter captcha using Curl? that is, you need to display the same form in the browser, fill it out and send it, after a successful login, the site redirects to the page ** this page itself and needs to be displayed in the browser for parsing. I tried first to parse the form and manually fill it out, but after the second request to get the desired page, it redirects me to authorization again, as I understand it, I need to get cookies for successful authorization, well, how can I do this if I don’t send it through the post in the curl?
Answer the question
In order to leave comments, you need to log in
Website: gatherproxy.com/ru/subscribe/login
function getC($url,$ref) {
$curl = curl_init();
$cookie = 'cookie.txt';
curl_setopt($curl, CURLOPT_COOKIESESSION, true);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']);
curl_setopt($curl, CURLOPT_REFERER, $ref);
curl_setopt($curl, CURLOPT_HEADER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST,false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER,false);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_COOKIEJAR, dirname(__FILE__)."/cookie/".$cookie);
$act = curl_exec($curl);
return $act;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question