$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://exemple.com/api/all.php");
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$data = [
'action' => 'auth',
'email' => "*****",
'password' => "*****",
'js_on' => 2017,
'timezone_diff' => -420,
'recaptcha' => "",
'x' => 970,
'y' => 361
];
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt');
curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt');
echo curl_exec($ch);
curl_close($ch);
if(is_file('cookie.txt'))
unlink('cookie.txt');
Пробую так ворачивает что авторизация не прошла, с ответом 400