$username = "zzzzzzzzzzzzzzzzzzzz";
$password = "zzzzzzzzzzzzzzzzzzzzzzz";
$fields = [
"username" => $username,
"password" => $password,
'gdpr_cookie_acceptance' => true,
];
$headers = array(
'Origin: https://secure.imvu.com'
);
$postdata = json_encode($fields);
//Start: Login And Setup Cookies******************************************
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://api.imvu.com/login");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, "cookie.txt");
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_REFERER, "https://secure.imvu.com/welcome/login/");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
$results = curl_exec($ch);
//End: Login And Setup Cookies******************************************