Answer the question
In order to leave comments, you need to log in
Php, curl - how to pass a captcha that returns ERROR for site owner: Invalid domain for site key?
My task is to parse a site that only loads using vpn. This is how my request looks like:
curl_setopt($this->ch, CURLOPT_URL, $url);
curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($this->ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($this->ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($this->ch, CURLINFO_HEADER_OUT, true);
curl_setopt($this->ch, CURLOPT_HTTPHEADER, [
"Upgrade-Insecure-Requests: 1",
"User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/76.0.3809.100 Safari/537.36",
"Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3",
"Accept-Language: en-US,en;q=0.9"
]);
return curl_exec($this->ch);
Answer the question
In order to leave comments, you need to log in
Parse data through the browser (in JavaScript), then there will be no such problems.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question