F
F
Flysink2016-10-08 17:26:17
PHP
Flysink, 2016-10-08 17:26:17

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

1 answer(s)
F
Flysink, 2016-10-08
@Flysink

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;
}

Actions: We go to the site, the form is displayed, fill in and send, go to gatherproxy.com/en/sockslist - download

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question