Jump to content

Radio DJ Scripts (Useful)


djgary72
 Share

Recommended Posts

Just recently started using Radio DJ instead on SAM and have been working hard to try and get the basic Now Playing Info from SQL to the Website and Ive managed it (Just!)

 

1st script - Change the Database details to suit you!

 

$con = mysql_connect("localhost","root","Password");
if (!$con) {
die('Could not connect: ' .mysql_error());
}

mysql_select_db("radiodj", $con);

$result = mysql_query("SELECT artist, title FROM history where artist not like 'sweeper' order by date_played desc LIMIT 0,1");

echo "</pre><table border="0" width="60%" cellspacing="1" cellpadding="0">


";
echo "
";
echo "Now Playing";
while($row = mysql_fetch_array($result)){
echo "";
echo "" . $row['artist'] . ' - ' . $row['title'] ."";

echo "";
}

echo "</table>";<br><br>mysql_close($con);<br

Thats the Now playing in order to get that showing on the site ive saved it as playing.php and then used a require tag in my index page

 

 require ("playing.php") ?>

So thats the now Playing sorted.

  • Thanks 1

My Blog https://djgarybaldy.blogspot.com

User of RadioDJ FREE radio playout software since 2010.

How to Install RadioDJ: https://djgarybaldy.blogspot.com/2020/08/how-to-install-radiodj-free-radio.html

RadioDJ is my most FAVOURITE piece of software EVER

 

 

Link to comment
Share on other sites

Now for the Most recent played tracks

 

//Edit the following line

$con = mysql_connect("localhost","root","Password");
if (!$con) {
die('Could not connect: ' .mysql_error());
}

mysql_select_db("radiodj", $con);


$result = mysql_query("SELECT artist, title FROM history where artist not like 'sweeper' order by date_played desc LIMIT 1,15");

echo "</pre><table border="0" width="80%" cellspacing="1" cellpadding="0">


";
echo "
";
echo "Recently played";
while($row = mysql_fetch_array($result)){
echo "";
echo "" . $row['artist'] . ' - ' . $row['title'] ."";

echo "";
}

echo "</table>";<br><br>mysql_close($con);<br>?&g

 

And yet again use the Require tag.

 

  require ("recent.php") ?>  

 

and all should be working ok for you ..... Make sure Port 3306 is Open on your Router and website etc ....

 

ENJOY!!

 

P.S working on the coming up part!

My Blog https://djgarybaldy.blogspot.com

User of RadioDJ FREE radio playout software since 2010.

How to Install RadioDJ: https://djgarybaldy.blogspot.com/2020/08/how-to-install-radiodj-free-radio.html

RadioDJ is my most FAVOURITE piece of software EVER

 

 

Link to comment
Share on other sites

  • 2 months later...
  • 9 months later...
  • 4 months later...
  • 5 months later...
  • 2 years later...
  • 7 months later...
  • 9 months later...
  • 1 year later...

i have just recently started out using radiodj at first i couldn't get use to it?

 

now that i have got my head finally around radiodj i am now working on a project

for the request site they have that comes with radiodj.

 

i am trying to get rid of that nasty green colour at the bottom

 

see here http://urban-radio.co.uk/req/request.php i have tried style.css

 

body,td,th {	font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
color: #000000;
}
body {
background: url(images/page_bg.png)  #FFFFFF;
margin: 20px 0 20px 0;
text-align:center;
}
div.wrapper {
width:80%;
margin-left:auto;
margin-right:auto;
background:#FFFFFF;
text-align:center;
border-left: 1px solid #000000;
border-right: 1px solid #000000;
}
a:link {
color: #000000;
text-decoration: none;
font-weight: bold;
}
a img {
border: none;
padding: 0;
margin: 0;
}
a:visited {
color: #000000;
text-decoration: none;
font-weight: bold;
}
a:hover {
color: #FF6600;
text-decoration: underline;
}
a:active {
color: #FF0000;
text-decoration: none;
}
.main_table {
margin-left:auto;
margin-right:auto;
width: 98%;
border: #000000 1px solid;
background:#FFFFFF;
padding:0;
}
.main_table td {
border-top:#000000 1px solid;
}


.header_live {
background: url(images/date_bg.png) repeat-x;
color:#FFFFFF;
font-weight:bold;
font-size:12px;
text-align:center;
}
td.header_no {
background: url(images/date_bg.png) repeat-x;
color:#FFFFFF;
font-weight:bold;
font-size:12px;
text-align:center;
width:30px;
}


td.entry_no {
text-align:center;
}


div.errordiv {
width: 95%;
padding-top: 10px;
padding-bottom: 10px;
margin-left: auto;
margin-right: auto;
text-align: center;
color: white;
background-color: maroon;
border: 1px solid red;
font-weight: bold;
}


div.noticediv {
width: 95%;
padding-top: 10px;
padding-bottom: 10px;
margin-left: auto;
margin-right: auto;
text-align: center;
color: white;
background-color: #FFFFFF;
border: 1px solid #000000;
font-weight: bold;
}
div.requestcontainer {
width: 98%;
padding-top: 10px;
padding-bottom: 10px;
margin-left: auto;
margin-right: auto;
text-align: center;
background-color: #F9E8D9;
border: 1px solid #000000;
}


div.menu {
width: 100%;
background: url(images/date_bg.png) repeat-x;
padding:20px 0 20px 0;
text-align:center;
margin: 0;
color: #666666;
}


div.menu a {
color: #FFFFFF;
}


div.menu a:visited {
color: #FFFFFF;
}
div.menu a:hover {
color: #FF0000;
}


div.footer {
width: 100%;
background: url(images/date_bg.png) repeat-x;
padding:10px 0 10px 0;
text-align:right;
margin: 0;
color: #777777;
border-top: 1px solid #000000;
}


.paginate {
font-family:Arial, Helvetica, sans-serif;
padding: 3px;
margin: 3px;
}


.paginate a {
padding:2px 5px 2px 5px;
margin:2px;
border:1px solid #999;
text-decoration:none;
color: #666;
}


.paginate a:hover, .paginate a:active {
border: 1px solid #999;
color: #000;
}


.paginate span.current {
   margin: 2px;
padding: 2px 5px 2px 5px;
border: 1px solid #999;
font-weight: bold;
background-color: #999;
color: #FFF;
}
.paginate span.disabled {
padding:2px 5px 2px 5px;
margin:2px;
border:1px solid #eee;
color:#DDD;
}

 

i have changed the green to white but nothing has changed

could someone please help me

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...