Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $radio = file_get_contents("https://i.mjh.nz/au/$stations/radio.json");
- if(!empty($radio)) {
- printf("<p>Radio stations in %s.</p><br />\n", $stations);
- }
- $json = json_decode($radio, true);
- foreach ($json as $key => $value) {
- if($val = 0)
- continue;
- if (!is_array($value)) {
- echo '<p>', $key . '=>' . $value . '</p>';
- } else {
- foreach ($value as $key => $val) {
- //echo '<p>', $key . '=>' . $val . '</p>';
- if ($key == "logo") {
- echo '<img src="', $val . '" width="24" alt=""/>';
- }
- if ($key == "name") {
- echo '<p>', $val . ' ';
- }
- if ($key == "mjh_master") {
- echo ' URL: ', '<a href="' . $val . '">' . $val .'</a>' . '</p>';
- echo '<hr noshade style="'. $class .'"/>';
- }
- }
- }
- }
- ?>
- </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement