okay so I updated the script
<?php
$url = 'https://secure.chess.com/login';
$postfields = "c1=USERNAME&loginpassword=PASSWORD&rememberme=checked";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//curl_setopt($ch, CURLOPT_USERPWD, $password);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
$response = curl_exec($ch);
echo $response;
?>
it brings me to the login page of the chess.com website, not logged into the account, I'm assuming it is not working?
sample credentials:
opticalpalace : phpfreaks