Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $key = "123"; // API Key anda.
- $service = "123"; // ID Layanan.
- $phone = "0853123456"; // No. Telp yang ditargetkan pesanan.
- $postdata = "key=$key&action=order&service=$service&phone=$phone";
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL, "https://arifahpedia.com/api/pulsa.php");
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
- $chresult = curl_exec($ch);
- curl_close($ch);
- $json_result = json_decode($chresult, true);
- if ($json_result['error'] == TRUE) {
- echo "ORDER GAGAL, PESAN : ".$json_result['error'];
- } else {
- echo "ORDER SUKSES, ORDER ID : ".$json_result['order_id'];
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement