I am trying to login to a website Using cURL I have read many answers on this website and still not able to get it. Please can someone help me find a solution
$url = 'https://secure.chess.com/login';
$postfields = "c1=USERNAME&loginpassword=PASSWORD&rememberme=";
$cookie = "cookie.txt";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt ($ch, CURLOPT_COOKIEJAR, $cookie);
$response = curl_exec($ch);
echo $response;
curl_infodumps, etc. Question is too tiny to even begin trying.