API KIRIM SMS REGULER

Untuk mengirim SMS ke satu penerima.

Perintah:

https://reguler.zenziva.net/apps/smsapi.php?userkey=xxx&passkey=xxx&nohp=xxx&pesan=xxx

Contoh:

https://reguler.zenziva.net/apps/smsapi.php?userkey=xxxxxx&passkey=xxxxxx&nohp=081234567890&pesan= test kirim sms dengan zenziva api
PARAMETER DESKRIPSI
userkey Userkey anda
passkey Passkey anda
nohp Nomor tujuan
pesan Isi pesan

Respon dari perintah di atas dalam format XML.

Contoh respon:

<response>
<message>
<to>081234567890</to>
<status>0</status>
<text>Success</text>
</message>
</response>

Contoh script php:

$userkey = "xxxxxx"; //userkey lihat di zenziva
$passkey = "xxxxxx"; // set passkey di zenziva
$message = "Terima Kasih, pendaftaran atas nama $nama telah berhasil di websiteAnda.com. Silahkan baca dan download petunjuk selanjutnya. Harap Maklum";
$url = "https://reguler.zenziva.net/apps/smsapi.php";
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS, 'userkey='.$userkey.'&passkey='.$passkey.'&nohp='.$telepon.'&pesan='.urlencode($message));
curl_setopt($curlHandle, CURLOPT_HEADER, 0);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curlHandle, CURLOPT_TIMEOUT,30);
curl_setopt($curlHandle, CURLOPT_POST, 1);
$results = curl_exec($curlHandle);
curl_close($curlHandle);

$XMLdata = new SimpleXMLElement($results);
$status = $XMLdata->message[0]->text;
echo $status;

API KIRIM SMS MASKING

Untuk mengirim SMS ke satu penerima.

Perintah:

https://alpha.zenziva.net/apps/smsapi.php?userkey=xxx&passkey=xxx&nohp=xxx&pesan=xxx

Contoh:

https://alpha.zenziva.net/apps/smsapi.php?userkey=f4jknm&passkey=1234&nohp=081234567890&pesan=kirim sms dengan zenziva api
PARAMETER DESKRIPSI
userkey Userkey anda
passkey Passkey anda
nohp Nomor tujuan
pesan Isi pesan

Respon dari perintah di atas dalam format XML.

Contoh respon:

<response>
<message>
<messageId>0200000000694926</messageId>
<to>081234567890</to>
<status>0</status>
<text>Success</text>
</message>
</response>

Contoh script php:

$userkey = "xxxxxx"; //userkey lihat di zenziva
$passkey = "xxxxxx"; // set passkey di zenziva
$message = "Terima Kasih, pendaftaran atas nama $nama telah berhasil di websiteAnda.com. Silahkan baca dan download petunjuk selanjutnya. Harap Maklum";
$url = "https://alpha.zenziva.net/apps/smsapi.php";
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS, 'userkey='.$userkey.'&passkey='.$passkey.'&nohp='.$telepon.'&pesan='.urlencode($message));
curl_setopt($curlHandle, CURLOPT_HEADER, 0);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curlHandle, CURLOPT_TIMEOUT,30);
curl_setopt($curlHandle, CURLOPT_POST, 1);
$results = curl_exec($curlHandle);
curl_close($curlHandle);

$XMLdata = new SimpleXMLElement($results);
$status = $XMLdata->message[0]->text;
echo $status;

API KIRIM SMS CENTER

Perintah:

http://SUBDOMAIN/api/sendsms.php?userkey=xxx&passkey=xxx&nohp=xxx&tipe=xxx&pesan=xxx

Contoh:

http://demo.zenziva.com/api/sendsms.php?userkey=f4jknm&passkey=1234&nohp=081234567890&tipe=reguler&pesan=kirim sms dengan zenziva api
PARAMETER DESKRIPSI
userkey Userkey anda
passkey Passkey anda
nohp Nomor tujuan
tipe Tipe sms yang akan dikirim. (Reguler/Masking)
pesan Isi pesan

Respon dari perintah di atas dalam format XML.

Contoh respon:

<response>
<message>
<messageId>0200000000694926</messageId>
<to>081234567890</to>
<status>0</status>
<text>Success</text>
</message>
</response>

Contoh script php:

$userkey = "xxxxxx"; //userkey lihat di zenziva
$passkey = "xxxxxx"; // set passkey di zenziva
$message = "Terima Kasih, pendaftaran atas nama $nama telah berhasil di websiteAnda.com. Silahkan baca dan download petunjuk selanjutnya. Harap Maklum";
$url = "https://SUBDOMAIN_ANDA/api/sendsms.php";
$curlHandle = curl_init();
curl_setopt($curlHandle, CURLOPT_URL, $url);
curl_setopt($curlHandle, CURLOPT_POSTFIELDS, 'userkey='.$userkey.'&passkey='.$passkey.'&nohp='.$telepon.'&tipe=reguler&pesan='.urlencode($message));
curl_setopt($curlHandle, CURLOPT_HEADER, 0);
curl_setopt($curlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($curlHandle, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curlHandle, CURLOPT_TIMEOUT,30);
curl_setopt($curlHandle, CURLOPT_POST, 1);
$results = curl_exec($curlHandle);
curl_close($curlHandle);

$XMLdata = new SimpleXMLElement($results);
$status = $XMLdata->message[0]->text;
echo $status;