Advertisement
Guest User

Api.php

a guest
Apr 24th, 2017
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.87 KB | None | 0 0
  1. <?php
  2. error_reporting(E_ALL);
  3. ini_set('display_errors', 1);
  4. ini_set('max_execution_time', 300000000);
  5. $data = array();
  6. $status = "bad";
  7. header('Content-Type: application/json');
  8. $emai = @strip_tags($_GET['email']);
  9. $idtk = @strip_tags($_GET['idtk']);
  10. $idvc = @strip_tags($_GET['idvc']);
  11. //config (di isi yang kosong)
  12. $server = "https://id.bookmyshow.com/serv/doSecureTrans.bms";
  13. $email = ""; //email lu
  14. $idcek = "3672549"; //nomor tiket
  15. $idcek2 = $idvc; //nomor vocer
  16. $nomorhp = ""; //nomor hp lu
  17. //jangan di edit
  18. //SIAKBARY genteng
  19. $p1 = '{"uip":"'.$idcek2.'","email":"'.$email.'","mob":"'.$nomorhp.'","card_no":"","nb_code":""}';
  20. $c = curl_init($server);
  21. curl_setopt($c, CURLOPT_REFERER, "https://id.bookmyshow.com/");
  22. curl_setopt($c, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/59.0.3067.6 Safari/537.36");
  23. curl_setopt($c, CURLOPT_TIMEOUT, 200);
  24. curl_setopt($c, CURLOPT_VERBOSE, false);
  25. curl_setopt($c, CURLOPT_RETURNTRANSFER, true);
  26. curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
  27. //v = CBLT apa ini?
  28. curl_setopt($c, CURLOPT_POSTFIELDS,"a=WEBIDN&v=ZCTM&t=".$idcek."&c=SETOFFERVIACOMP&p1=".urlencode($p1)."");
  29. curl_setopt($c, CURLOPT_POST, 1);
  30. $cekme = curl_exec($c);
  31. $cekme = strip_tags($cekme);
  32. $getrespon = explode("|", $cekme);
  33. if(@$getrespon[0] == "true"){
  34. unset($getrespon[0]);
  35. array_pop($getrespon);
  36. foreach($getrespon as $x){
  37. $hereme = explode("=", $x);
  38. $data[$hereme[0]] = $hereme[1];
  39. }
  40. $status = "ok";
  41. } else {
  42. $data['log'] = $cekme;
  43. }
  44. $data['code'] = $idcek2;
  45. $data['status'] = $status;
  46. echo json_encode($data);
  47. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement