Radionomy - Board
https://board.radionomy.com/

[HTML Code] Tracklist "Last Played"
https://board.radionomy.com/viewtopic.php?f=28&t=133
Page 1 of 1

Author:  Jamie [ Tue Jul 02, 2013 12:42 am ]
Post subject:  [HTML Code] Tracklist "Last Played"

Undoubtedly, you have set up the caching script on your site and now are wondering how to get the gobbledygook that it outputs to look nice on your site.

What you must do is use your old script that you use to display your last played chart, and change the portion that is this:
Code:
 $xml = @simplexml_load_file("http://api.radionomy.com/tracklist.cfm?blahblahblah");


You must change the URL from api.radionomy.com to the path to your uploaded script from here. The script in this topic emulates the Radionomy API.

In case you don't have a script to display the tracklist, here's one: (remember to change the url that is called to reflect the url to your script):

Code:
<?php
   // All settings now in call_api.php, download from http://board.radionomy.com/
   // Script by Jamie Welch
 
   ?>
 
   
   
      
         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
            <link rel="stylesheet" href="style.css" type="text/css">
      
      
        <div class="main">
          <div class="inner">
            <h3>Last 50 Songs Played</h3>
            <div style="text-align:center; padding-left:10px; margin-top:20px;">
               <!--?php
                  $xml = @simplexml_load_file("http://mysite.com/cache/tracklist/call_api.php");
                  if($xml){
                   echo '<table-->';
                     foreach ($xml-&gt;track as $value){
                        print "".$value-&gt;title."";
                        print $value-&gt;artists."";
                     }
                   echo '';
                  }
                  else{
                   echo 'Error with the call_api.php!';
                  }
               ?&gt;
            </div>
          </div>
        </div>
 
      
   

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/