SHARE
TWEET

Class Order Just Pulsa

ariedomani_ Jun 25th, 2019 (edited) 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $key = "123"; // API Key anda.
  3. $service = "123"; // ID Layanan.
  4. $phone = "0853123456"; // No. Telp yang ditargetkan pesanan.
  5. $postdata = "key=$key&action=order&service=$service&phone=$phone";
  6.  
  7. $ch = curl_init();
  8. curl_setopt($ch, CURLOPT_URL, "https://arifahpedia.com/api/pulsa.php");
  9. curl_setopt($ch, CURLOPT_POST, 1);
  10. curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
  11. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  12. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  13. $chresult = curl_exec($ch);
  14. curl_close($ch);
  15. $json_result = json_decode($chresult, true);
  16.  
  17. if ($json_result['error'] == TRUE) {
  18.     echo "ORDER GAGAL, PESAN : ".$json_result['error'];
  19. } else {
  20.     echo "ORDER SUKSES, ORDER ID : ".$json_result['order_id'];
  21. }
  22. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top