Path: C:\
<?php
if ($id!==32){$final='*ATENCAO: '.$moto.'*.'.$aviso[$a[0]];}else{$final='*Bom dia '.$moto.'*.'.$aviso[$a[0]];}
$ja=date("d-m-Y G:i:s");
if ($cel!=='')
{ $url = "https://api.touschat.pro/token/uagq94z/send/";
$curl = curl_init($url);
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_POST, true);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
$headers = array(
"Content-Type: application/x-www-form-urlencoded",
);
curl_setopt($curl, CURLOPT_HTTPHEADER, $headers);
$data = "token=chave-aleatoria&cmd=chat&to=55".$cel."@c.us&msg=".$final;
curl_setopt($curl, CURLOPT_POSTFIELDS, $data);
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
$resp = curl_exec($curl);
curl_close($curl);
$status='ENVIADA';
}
else
{ $status='SEM CELULAR';}
$json2='"'.$ja.'":{"nome":"'.$moto.'","cel":"'.$cel.'","msg":"'.$a[0].'","status":"'.$status.'"},
';
$fopen2=fopen('arquivos/zap-enviado.json','a');
$fwrite2=fwrite($fopen2,$json2);
fclose($fopen2);
?>