Results 1 to 10 of 10
  1. #1
    garybaldy72uk's Avatar
    Title
    Senior Member
    Join Date
    Oct 2010
    Location
    Manchester
    Posts
    671
    Rep Power
    30

    Radio DJ Scripts (Useful)

    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!

    PHP Code:
    <?php
    $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 
    "<table border='0' width='60%' cellspacing='1' cellpadding='0'>
    <tr>

    </tr>"
    ;
    echo 
    "<br />";
    echo 
    "Now Playing";
    while(
    $row mysql_fetch_array($result)){
    echo 
    "<tr>";
    echo 
    "<td>" $row['artist'] . ' - ' $row['title'] ."</td>";

    echo 
    "</tr>";
    }

    echo 
    "</table>";

    mysql_close($con);
    ?>
    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

    PHP Code:
    <? require ("playing.php"?>
    So thats the now Playing sorted.

  2. #2
    garybaldy72uk's Avatar
    Title
    Senior Member
    Join Date
    Oct 2010
    Location
    Manchester
    Posts
    671
    Rep Power
    30

    Part 2

    Now for the Most recent played tracks

    PHP Code:
    <?php

    //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 
    "<table border='0' width='80%' cellspacing='1' cellpadding='0'>
    <tr>

    </tr>"
    ;
    echo 
    "<br />";
    echo 
    "Recently played";
    while(
    $row mysql_fetch_array($result)){
    echo 
    "<tr>";
    echo 
    "<td><h5>" $row['artist'] . ' - ' $row['title'] ."</td></h5>";

    echo 
    "</tr>";
    }

    echo 
    "</table>";

    mysql_close($con);
    ?>
    And yet again use the Require tag.

    PHP Code:
     <? 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!

  3. #3
    garybaldy72uk's Avatar
    Title
    Senior Member
    Join Date
    Oct 2010
    Location
    Manchester
    Posts
    671
    Rep Power
    30
    Template No Longer available.




    Last edited by garybaldy72uk; 05-07-2013 at 04:44 PM. Reason: Updating post

    http://djgarybaldy.co.uk
    http://djgarybaldy.co.uk/radiodj-fre...ation-software
    https://www.facebook.com/DJGarybaldy


    Problems with your current automation program? Why not switch to Radio DJ Free Radio Automation Software instead? It's 100% FREE & reliable. http://radiodj.ro

  4. #4
    garybaldy72uk's Avatar
    Title
    Senior Member
    Join Date
    Oct 2010
    Location
    Manchester
    Posts
    671
    Rep Power
    30
    Template No Longer available.
    Last edited by garybaldy72uk; 05-07-2013 at 04:45 PM.

    http://djgarybaldy.co.uk
    http://djgarybaldy.co.uk/radiodj-fre...ation-software
    https://www.facebook.com/DJGarybaldy


    Problems with your current automation program? Why not switch to Radio DJ Free Radio Automation Software instead? It's 100% FREE & reliable. http://radiodj.ro

  5. #5
    garybaldy72uk's Avatar
    Title
    Senior Member
    Join Date
    Oct 2010
    Location
    Manchester
    Posts
    671
    Rep Power
    30

    New template

    Template No Longer available.
    Last edited by garybaldy72uk; 05-07-2013 at 04:45 PM.

    http://djgarybaldy.co.uk
    http://djgarybaldy.co.uk/radiodj-fre...ation-software
    https://www.facebook.com/DJGarybaldy


    Problems with your current automation program? Why not switch to Radio DJ Free Radio Automation Software instead? It's 100% FREE & reliable. http://radiodj.ro

  6. #6

    Title
    Junior Member
    Join Date
    Nov 2012
    Posts
    4
    Rep Power
    0
    Thanks for this, this is very useful for a project I'm working on!

    Best regards,

    Jamie Welch

  7. #7
    wtiadmiller's Avatar
    Title
    Junior Member
    Join Date
    Apr 2014
    Posts
    10
    Rep Power
    7
    Thanks for the tools !
    Donald M.
    Operations Manager
    The Indie Authority - The Authority On Indie Music!

    Website: www.theindieauthority.com
    E-Mail: dmiller@theindieauthority.com
    Facebook: www.facebook.com/theindieauthority
    Twitter: @theindieauth

  8. #8

    Title
    Junior Member
    Join Date
    Sep 2015
    Posts
    12
    Rep Power
    5
    Seems interesting!

  9. #9

    Title
    Junior Member
    Join Date
    Jun 2016
    Posts
    11
    Rep Power
    5
    thanks, i love radiodj i m using for my live show at radio !!

  10. #10

    Title
    Barely A Broadcaster
    Join Date
    Jun 2016
    Location
    Hastings East Sussex
    Posts
    87
    Rep Power
    0

    Cool radio dj scripts

    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

    Code:
    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

Similar Threads

  1. New site design
    By billh in forum General Internet Radio Discussions
    Replies: 4
    Last Post: 12-10-2010, 04:24 PM
  2. Introduction
    By drewpine in forum Introduce Yourself
    Replies: 10
    Last Post: 12-08-2009, 12:18 AM
  3. Logo
    By fozzy in forum General Chat
    Replies: 10
    Last Post: 07-14-2009, 03:30 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •