Advertisement
ilmupanel

Get Services Atlantic

May 20th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.91 KB | None | 0 0
  1. <?php
  2. $key = "APIKEY MU"; // your api key
  3. $postdata = "action=layanan&api_key=$key";
  4.  
  5. $ch = curl_init();
  6. curl_setopt($ch, CURLOPT_URL, "https://Atlantich2h.com/sosial-media");
  7. curl_setopt($ch, CURLOPT_POST, 1);
  8. curl_setopt($ch, CURLOPT_POSTFIELDS, $postdata);
  9. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  10. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
  11. $chresult = curl_exec($ch);
  12. echo $chresult;
  13. curl_close($ch);
  14. $json_result = json_decode($chresult, true);
  15. $indeks=0;
  16. $i = 1;
  17. // get data service
  18. while($indeks < count($json_result['data'])){
  19. $category = $json_result['data'][$indeks][kategori];
  20. $idser = $json_result['data'][$indeks][sid];
  21. $service = $json_result['data'][$indeks][layanan];
  22. $min_order = $json_result['data'][$indeks][min];
  23. $max_order = $json_result['data'][$indeks][max];
  24. $price = $json_result['data'][$indeks][harga];
  25. $note = $json_result['data'][$indeks][catatan];
  26. $indeks++;
  27. $i++;
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement