Advertisement
Guest User

spam

a guest
Dec 16th, 2019
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. <?php
  2. function Spam()
  3. {
  4. print_r("Masukan Nomor Telp : ");
  5. $no = trim(fgets(STDIN));
  6.  
  7. $param = http_build_query(
  8. array(
  9. "msisdn" => $no,
  10. "accept" => "call"
  11. )
  12. );
  13.  
  14. $ch = curl_init();
  15.  
  16. curl_setopt($ch,CURLOPT_URL,"https://www.tokocash.com/oauth/otp");
  17. curl_setopt($ch,CURLOPT_RETURNTRANSFER,1);
  18. curl_setopt($ch,CURLOPT_COOKIEJAR,"cookie.txt");
  19. curl_setopt($ch,CURLOPT_COOKIEFILE,"cookie.txt");
  20. curl_setopt($ch,CURLOPT_POST,1);
  21. curl_setopt($ch,CURLOPT_POSTFIELDS,$param);
  22.  
  23. $main = curl_exec($ch);
  24.  
  25. curl_close($ch);
  26.  
  27. if ($main === FALSE) {
  28. print(curl_errno($ch));
  29. } else {
  30. return($main);
  31. }
  32. }
  33.  
  34. Spam();
  35.  
  36. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement