Create SMS
<?php
$some_data = array(
'usersecretkey'=>'5sFrgAhBHsaq9Pp',
'phoneno'=>'60123456781', // with country code without '+' sign
'content'=>'This is an SMS content test'
);
$curl = curl_init();
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_URL, 'https://sys.infoneka.com/index.php/apiv1/createsms');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $some_data);
$result = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
$obj = json_decode($result);
echo $obj->status;
?>
Create PUSH NOTIFICATION TO INFONEKA ANDROID APP
<?php
$some_data = array(
'usersecretkey'=>'5vXtpyhBHser4Pp',
'email'=>'x@x.com', //receiver email
'content'=>'hello world'
);
$curl = curl_init();
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_URL, 'https://sys.infoneka.com/index.php/apiv1/createpush');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $some_data);
$result = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
$obj = json_decode($result);
echo $obj->success;
?>
Create WHATSAPP MESSAGES
<?php
$some_data = array(
'usersecretkey'=>'6ujCpyhWEqwq9Ps',
'phone'=>'601xxxxxxxx',
'content'=>'test'
);
$curl = curl_init();
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_URL, 'https://sys.infoneka.com/index.php/apiv1/createws');
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_POSTFIELDS, $some_data);
$result = curl_exec($curl);
$info = curl_getinfo($curl);
curl_close($curl);
$obj = json_decode($result);
echo $obj->status;
?>