cdfteller

SMS Purindo

Sep 8th, 2018
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.95 KB | None | 0 0
  1. <?php
  2.  
  3.  
  4.  $token = "b4b643cb1547b52057fxrf15336158188a"; // masukkan token anda
  5.  $passkey = "juyxx"; // masukkan passkey anda
  6.  $message ="isi pesan"; // masukkan isi pesan
  7.  $number ="085760525722"; // masukkan no hp
  8.  $nama = "bondand"; // nama di phone book
  9.      
  10.       $ch = curl_init();
  11.       $fields = array(
  12.       'token'=>$token,
  13.       'aksi'=>'1',        // aksi  = 1 kirim sms ,  aksi = 2 cek saldo dan masa aktif ,  aksi = 3 lihat sms outbox ,   aksi = 4 add phone book
  14.       'pesan'=> $message,
  15.       'hp'=>$number,
  16.       'passkey'=> $passkey,    
  17.       'nama'=> $nama,
  18.       );
  19.       $postvars = json_encode($fields);
  20.       $url = "http://purindo.net/api/sms.php";
  21.      
  22. $ch = curl_init();
  23. curl_setopt($ch, CURLOPT_URL, $url);
  24. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  25. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
  26.  
  27. curl_setopt($ch, CURLOPT_POST, 1);
  28. curl_setopt($ch, CURLOPT_POSTFIELDS, $postvars);
  29. $result = curl_exec($ch);
  30.  
  31. //echo $result;
  32.  
  33.  
  34. ?>
Advertisement
Add Comment
Please, Sign In to add comment