$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $api_url);
curl_setopt($ch, CURLOPT_POST, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$result = curl_exec($ch);
print_r($result );
I was using API on some website it was working fine until it implemented cloudflare’s protection. I used the above code to request some data and the output was the cloudflare’s page saying “Checking your browser before accessing”
What am I doing wrong. Is there any solution. Do i need to change the code or contact the website to whitelist my server’s ip ?