1

Invio di PDF

<?php

$nodeurl = ‘https://api.wazone.app/send’;

$mediaurl = ‘https://wazone.app/public/users/1/avatar.png’;

$data = [
‘receiver’ => ‘34644975414’,
‘msgtext’ => ‘Testing send message through API’,
‘sender’ => ‘393515475482’,
‘token’ => ‘aqtObsJdDRDBx1paMwfl’,
];

$ch = curl_init();
curl_setopt($ch, CURLOPT_HTTPHEADER, [‘Content-Type: application/x-www-form-urlencoded’]);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, ‘POST’);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data));
curl_setopt($ch, CURLOPT_URL, $nodeurl);
curl_setopt($ch, CURLOPT_TIMEOUT, 30);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
$response = curl_exec($ch);
curl_close($ch);

echo $response;

?>

Hai trovato utile questo articolo? No 1

Come possiamo aiutarti?