Another Airtime Pro Hack

Prepper Broadcasting has returned to airtime.pro as Red Beacon Media. And I was looking over the changes that Airtime has done since we last used them to broadcast the radio station. They’ve added better smartblocks, and even included a new twitter feature which makes life a lot easier then it was.

Even with these improvements sometimes you need to just do things yourself.

One of the drawbacks of thier current twitter add-on was that it only uses one twitter account, and the other being you really can’t customize the crap outa what you are sending to twitter.

I’ve used twitterfeed.com and roundteam on twitter for ages, and I thought I would give it a go and see what I could do to customize the twitter accounts we use to display the “Now Playing” bits and other useful info we could use.

Turns out there is a json API data stream that is used for thier default player widgets, which means there is a lot more you can do then just tweet your now playing info.

Now Playing to multiple twitter accounts:

In the attachement below you will find a zip of sample files that your webmaster can use to customize just about anything you can think of for your site. I’ve included a nowplaying.php file which is in RSS Feed format.

Here are some tips on useage you might be interested in:

First uncompress the zip folder to a location on your web hosting, under /public_html/ a folder such as /twitterfeeds/ would be a good example if your going to use the example for twitterfeed.com

(I am assumiong that your hosting control panel allow you to edit the files online, instead of editing first then uploading them to the site)

Next you have to edit a couple of files. The first file is the nowplaying.php file and make sure that the line “$config = “./atp-config.php” ;” is correct. (should be if you place everything in the same path from the zip).

Next edit the “api-config.php” file. All of the settings in this file are pretty much easy to understand, except maybe the $radioid one. If you goto your widegets and get the source code for the widget they provide you can see the radio id in the url as the first set of characters, for example:

https://RADIOID.airtime.pro/embed……

You need to get this right or the script will not work.

Since the example I am giving in the zip file is intended to be used by twitterfeed I don’t include a way of storing the data in a mysql database so we don’t swamp the airtime server with requests for the api data. If you use the main functions for anything that calls the api a lot, you should send the data to a database from a seperate crontab so that your not asking for it every ten seconds. Twitterfeed’s lowest setting is every 30 minutes, I just call the api directly in the nowplaying.php file.

Some other ideas….

Import To WordPress:

I included a sample-array-data.txt file in the zip. There are a lot of items in the php array that is produced by the functions in the hack. You could create a feed that could be imported directly into wordpress containing all the information of an upcoming podcast/show for example (Or Archive info on past shows), using the wordpress plugin called FeedWordPress (Author: Charles Johnson).

Automate reporting of Royalties for copyrighted music:

Storing the API data into a MySql database with the timestamps included would allow you to set up automatic reporting to serivices which handle linscing of copyrighted music for your radio station. You just have to make sure you send it to them in the correct format an time schedule.

Compare Music and Shows Played with Listener Stats:

It would take much more effort to compare your listen stats, blog stats, and other sources of visitors to your radio station streams and the API data collected into a database to figure out what works best. Maybe the show you are playing would work better at 6pm instead of 8pm? Maybe you loose listeners everytime you play the music your brother made? All these kinds of questions could be answered by have a searchable database of different stat sources to compare them, the API data from airtime pro would be just one of them.

Search and Replace Data:

If you are using the stats to pay for royalities, but also want to use the data to display a custom add-on to a player so that the current song has a shopping link in your store, you could set up a simple search and replace scheme in your script to display the shopping link based on the tracks url.

MP3 Tags could be used better:

One of the things that really annoyed me about having to import mp3 files into radio the station (Thank You Air Time for the RSS Import smartblock HUGE IMPROVEMENT!) is that the podcast DJ’s never added album art etc, of used MP3 tag editors to include author names, etc… In even the sample data I include in the zip you can see a lot is missing. Making sure that information is there can help you do a lot more with this hack, and it’s good practice. Cover art would allow you to include an image with an amazon affiliate link to have your listeners download a copy of your music or shows. Not to mention a host of other stuff I can’t even begin to think about.

Any other ideas or improvements? Leave a comment.

– Wolfe

 

[download-attachment id=”721″ title=”airtimeprohack”]

 

 

 

Share

Comments are closed