Files
airtime-reseller/app/Libs/Ntfysender.php
Kwesi Banson Jnr 2cfcfade4e Initial commit
2026-08-04 14:50:01 +00:00

33 lines
777 B
PHP

<?php
namespace App\Libs;
use Config;
use Log;
use App;
class Ntfysender {
function sendNtfy($data){
$url = 'https://ntfy.sh/airtimeSalesPortal';
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_HTTPHEADER => array(
'Content-Type: application/json'
),
CURLOPT_URL => $url,
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 => $data
));
$response = curl_exec($curl);
return $response;
}
}
?>