Advertisement
ardann

Parsing output JSON

Jun 24th, 2018
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.40 KB | None | 0 0
  1. <?php
  2. /*
  3. contoh script untuk memparsing hasil json dari https://api.zonkploit.com/yt/fetch-videos/
  4. nanti kamu kembangin sendiri ya! :)
  5. https://zonkploit.com || https://www.bac0ders.me
  6. */
  7. $id = "UCfMcMOvgflhwW3FQtLosn7Q"; // id channelnya
  8. $json = json_decode(file_get_contents("https://api.zonkploit.com/yt/fetch-videos/".$id), TRUE);
  9. foreach ($json['result'] as $urls) {
  10.     echo $urls['url']."\n";
  11. }
  12. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement