Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(1);
- $data = array(
- 'api_key' => "8PpUMSHSMiyAoZpTOTAVRz5bZ0TMAnho", //API Key
- 'action' => "pemesanan",
- 'layanan'=>"TSP1", //Service code, lihat di list produk
- 'target'=>081322207701// Nomor tujuan pengisian
- );
- $curl = curl_init();
- curl_setopt_array($curl, array(
- CURLOPT_URL => "https://atlantich2h.com/pulsa",
- CURLOPT_RETURNTRANSFER => true,
- CURLOPT_ENCODING => "",
- CURLOPT_MAXREDIRS => 10,
- CURLOPT_TIMEOUT => 600,
- CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
- CURLOPT_CUSTOMREQUEST => "POST",
- CURLOPT_POSTFIELDS => http_build_query($data),
- CURLOPT_HTTPHEADER => array(
- "Accept: */*",
- "Accept-Encoding: gzip, deflate",
- "Cache-Control: no-cache",
- "Connection: keep-alive",
- "Content-Length: 536",
- "Content-Type: multipart/form-data; boundary=--------------------------547457936070693055102751",
- "Host: atlantich2h.com",
- "Postman-Token: 43b8037d-c5a6-469e-923f-3637b7763335,e87149ac-4216-4d83-94a7-424fcf5c9533",
- "User-Agent: PostmanRuntime/7.17.1",
- "cache-control: no-cache",
- "content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW"
- ),
- ));
- $response = curl_exec($curl);
- $err = curl_error($curl);
- curl_close($curl);
- if ($err) {
- echo "cURL Error #:" . $err;
- } else {
- echo $response;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement