Here is API code for SMS provider site and I want use PHP data variables inside of places that should be fill with changeable variables I tried some solutions but no SMS received after test that
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api......',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"mobile": "xxxx", ----> i want use php variables like $number here
"templateId": xxxx, ------> and here
"parameters": [
{
"name": "NAME",
"value": "xxx" ---------> here
},
{
"name":"DESCRIPTION",
"value":"xxx" ------------> here
},
{
"name":"ORDER",
"value":"xxx" -----> here
}
]
}',
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json',
'Accept: text/plain',
'x-api-key:xxxxxxxx...'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;