Jump to content

[USEFUL] DJ On Air Script


James
 Share

Recommended Posts

Heres a script i had developed for a local radio station. I thought i might as well share it with Broadcasting World too!

 

It requires you simply to enter your DJ Schedule Data (Img, Title & Sub) and for you to change your timezone. Here is a list of timezones supported for this web app!

 

nowon.php

putenv("TZ=Australia/Melbourne");
$h = date('G');
$d = date('w');

putenv("TZ=Australia/Melbourne");


// Sunday
if ($d == 0 && $h >= 0 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
} 
elseif ($d == 0 && $h >= 6 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 0 && $h >= 10 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 0 && $h >= 11 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 0 && $h >= 12 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}


// Monday
if ($d == 1 && $h >= 0 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
} 
elseif ($d == 1 && $h >= 6 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 1 && $h >= 10 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 1 && $h >= 11 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 1 && $h >= 12 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}


// Tuesday
if ($d == 2 && $h >= 0 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
} 
elseif ($d == 2 && $h >= 6 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 2 && $h >= 10 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 2 && $h >= 11 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 2 && $h >= 12 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}


// Webnesday
if ($d == 3 && $h >= 0 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
} 
elseif ($d == 3 && $h >= 6 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 3 && $h >= 10 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 3 && $h >= 11 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 3 && $h >= 12 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}


// Thursday
if ($d == 4 && $h >= 0 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
} 
elseif ($d == 4 && $h >= 6 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 4 && $h >= 10 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 4 && $h >= 11 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 4 && $h >= 12 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}


// Friday
if ($d == 5 && $h >= 0 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
} 
elseif ($d == 5 && $h >= 6 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 5 && $h >= 10 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 5 && $h >= 11 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 5 && $h >= 12 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}


// Saturday
if ($d == 6 && $h >= 0 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
} 
elseif ($d == 6 && $h >= 6 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 6 && $h >= 10 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 6 && $h >= 11 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}
elseif ($d == 6 && $h >= 12 && $h      $img = 'image.jpg'; //Image Source
    $title = 'Tunes'; //Show Title
    $sub = 'All Night'; // Short Description
}

echo'' . $img . '

' . $title . '
' . $sub . '';

?>

 

Let me know how you go :)

  • Like 1
  • Thanks 1

Studiio - All-In-One Radio Communication Platform
SMS | Phone Calls | Social Media | Content

Link to comment
Share on other sites

  • 1 month later...

James ... great script ...

 

i have all the DJs time slots entered ok ... and send out to 3 TXT files for flash to pick up ... it all works brilliantly until 10pm at night and for some unknown reason as soon as it hits the 9pm or 10pm slot, at night (UK time), i get nothin shown ... I don't know why ...

 

i have a PHP file called dj.php that has your script in and when it is processed it dumps the DJ info (DJ name) (DJ show) (DJ staus - Live, Recorded or Stream) to the 3 seperate TXT files ... flash then grabs the info from the TXT files and displays that on the website and in the chatroom ...

 

the flash SWF is only a few kb in size and works fine ... it's just the script that seems to cause a fault ...

 

i'm also new to PHP and lovin it ... especially as I'm more of a Flash designer ...

 

EDIT:

Ok here is exaclty what the script does ...

 

Works throughout the day perfectly then come 10pm at night (UK time) it displays nothing ... variables seem blank and display info displays nothing at all ... until when 12am in the morning come (2hrs later) then the display info goes back to displaying the correct info again ... then its fine throught the day again until 10pm again ...

 

So for the 2hrs (10pm -12am) it displays nothing ... I am stumped ...

 

cheers,

Gem

:)

Link to comment
Share on other sites

  • 3 months later...

Try this Topic a much simpler script is Posted on there all you have to do is change/add times in 24 hr format and the picture links!

 

http://forums.broadcastingworld.net/showthread.php?9521-Would-this-be-Possible

 

Hope that Helps

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

  • 4 months later...
anything without PHP?

 

PHP is really the way to go. Almost anyone can learn it, or at least "poke" their way around it to get it to do what you want it to. What are you looking for? ASP? ColdFusion?

Stream101 | Affordable Media Solutions

Shared cPanel? Web Hosting | WordPress Hosting | Premium Stream Hosting

TOLL-FREE: (616) 277-7280 | 30 Day NO QUESTIONS Money-Back Guarantee

100% Cogent Free Network | CloudLinux OS | Tier 1 Bandwidth | Grand Rapids, MI

Link to comment
Share on other sites

my website doesn't support PHP so I'm stuck with HTML and Javascript

 

You're not going to find anything like what you want that is not in PHP or a similar language. HTML is purely visible and Javascript will bog your site down if something is written in that. Maybe you could have a Java applet developed. My suggestion is to find a host that has cPanel as it is, in my opinion, the best control panel for beginners. If you have a cPanel host, you'll be able to support PHP!

Stream101 | Affordable Media Solutions

Shared cPanel? Web Hosting | WordPress Hosting | Premium Stream Hosting

TOLL-FREE: (616) 277-7280 | 30 Day NO QUESTIONS Money-Back Guarantee

100% Cogent Free Network | CloudLinux OS | Tier 1 Bandwidth | Grand Rapids, MI

Link to comment
Share on other sites

Any server can support PHP. No need for cPanel. Find another host to get your server from.

 

I know that, I was simply stating that I recommend cPanel, especially for beginners!

Stream101 | Affordable Media Solutions

Shared cPanel? Web Hosting | WordPress Hosting | Premium Stream Hosting

TOLL-FREE: (616) 277-7280 | 30 Day NO QUESTIONS Money-Back Guarantee

100% Cogent Free Network | CloudLinux OS | Tier 1 Bandwidth | Grand Rapids, MI

Link to comment
Share on other sites

  • 8 months later...
  • 3 months later...

hi there does anyone have a script for a dj center were

you can put an image in the script for dj center,

then login to the center using name and pass for example

epicfm.co.uk:80 then you put a username and pass in there

 

then once logged in each DJ can upload there banner or image to

a media player on through an on air php script so

say if i were to go on air i would login to the dj center upload

my image/banner then it would be on there?

 

please check out http://www.106themix.com and look at there players

they have a banner/image ontop there media players but i would like to do it through

a php on air script of possible but if not through what i have just said

Link to comment
Share on other sites

hi there im wondering if you're on air script would work

with this script

 










http://www.106themix.com/onairinfo/images/logo.gif


 

please help

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...

Thanks, James, it's a very useful script. Could you or anyone else add minutes to the script? I mean, we have some shows that ends 7:30, or 9:25, and I can't figure it out by myself. Help would be very appreciated, thanks!

 

Simon

Link to comment
Share on other sites

  • 8 months later...
  • 1 month later...
  • 2 weeks later...

hi there the top bit of you're script is set for a different country, and im in the UK GMT Time

what shall i put in this part <?php

 

putenv("TZ=Australia/Melbourne");

$h = date('G');

$d = date('w');

 

 

putenv("TZ=Australia/Melbourne"); as like i say im in england GMT Time

 

 

 

and also i wanna go live on the air from 4pm till 6pm GTM

 

how does that work.........

 

elseif ($d == 3 && $h >= 14 && $h

Edited by djultra89
coding
Link to comment
Share on other sites

  • 2 months later...
Anyone know were I can a script for a dj schedule were I can add the times that the djs are on. And there images, also I would like it to change automatically everytime a dj goes on the air and when they go off the air and changes back to the autodj image? Any help
Link to comment
Share on other sites

  • 5 weeks later...

Just change the timezone. Where it says:

Australia/Melbourne

 

Change that to your timezone based on the PHP Timezone List.

Stream101 | Affordable Media Solutions

Shared cPanel? Web Hosting | WordPress Hosting | Premium Stream Hosting

TOLL-FREE: (616) 277-7280 | 30 Day NO QUESTIONS Money-Back Guarantee

100% Cogent Free Network | CloudLinux OS | Tier 1 Bandwidth | Grand Rapids, MI

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...