A »Now Playing« Plugin for WordPress

onAirNow is a WordPress plugin for displaying information about your currently playing song on your blog. It reads the track information from a file and displays it where you want it to appear (usually your sidebar).

I’m using it on my website since a few days and it’s really great and easy to use. Ben Turgeon

You can add the onAirNow output to every part of your blog. I prefer the sidebar as it is a common place for this kind of information. You can see how onAirNow may look on my sidebar. It works out of the box with the WordPress default themes and maybe your theme, too. It even supports WordPress Widgets!


  • WordPress (tested with versions 2.0.4, 2.1+, 2.2+ and 2.3+)
  • FTP access to your blog’s server
  • a music player like iTunes or Winamp
  • a client program to upload the information about the currently playing song

Hi, thanks for the great plugin. I’ve integrated a plugin to my mIRC mp3 player to create and upload the file. This is just what the doctor ordered! Great stuff! Perfect! billythekid

You’ll need a client-side program which can upload a customly formatted file with the needed information via FTP to your blog. There are many programs like this as a plugin for your music player or a stand-alone program. Have a look at programs like Now Playing (by Brandon Fuller; onAirNow works out of the box) or Recent Tunes for iTunes (OS X), Now Playing (by Nevala) or Do Something for Winamp and AMIP for mIRC (supports many different music players). An AppleScript for Mac OS X to upload the song information is bundled with the onAirNow download. The script works best when used together with Quicksilver or any application which launches it after a certain key combination was pressed.

Adding onAirNow to Your Blog

I was able to do a much more elegant solution with onAirNow. David Goldstein

Download the ZIP file and unpack it. Upload the included onAirNow/ folder to your blog’s /wp-content/plugins/ folder and activate the plugin from your admin panel. onAirNow adds its own options page and also information about the currently playing song to your dashboard and below your username (you can switch this off).

Once this installation is done and if your WordPress theme supports widgets you can skip the step of adding code to your theme. Just go to the Presentation tab and choose Sidebar Editor.

If you’re not using widgets you can add the following code to your blog’s sidebar or wherever you want the track information to appear:

<?php if (function_exists("onAirNow")) { onAirNow(); } ?>

You may need to surround the above code with <li></li> tags (or insert them inside the if-statement) if you want onAirNow on your sidebar. It depends on the theme you are using. Take a look at how other functions are inserted in your sidebar.

Uploading the Track Info File

Upload a file named onAirNow.track (default file name, configureable) with information about artist and title and optional album, track number, year, song length, cover URL and filename to the plugin’s upload directory at /wp-content/plugins/onAirNow/onAirNowUpload/ by using the program which gets the information from your music player. The uploaded file must be readable by your web-server process.

It is wise to create a separate FTP user with access to just the onAirNowUpload/ directory.

The file format is as follows (make your client-side program generate such a file):


(SONG_LENGTH has the format HH:MM:SS, MM:SS or just seconds.)

If for some reason you can’t upload such a pseudo-XML file there is another possibility. If no or incomplete track info was found inside your track info file a user-provided pattern will be matched against the provided song title, the filename (if provided; without the path) and the contents of the whole track info file (in this order until the track info is complete) to extract the information. This is useful if you are streaming music and you have only the song title containing all info or ID3 tags are missing and your music player can only provide the filename.

A possible pattern is: {[%n]} %a - %t {(%l {- %y})}{.%e}
Strings that work with this pattern include:

  • [03] Artist – Song (Album – Year).mp3
  • [03] Artist – Song (Album – Year)
  • [03] Artist – Song (Album)
  • [03] Artist – Song
  • Artist – Song (Album – Year).mp3
  • Artist – Song (Album).mp3
  • Artist – Song.mp3

Play a bit around with this pattern matcher until you find what you need and be sure to report any problems!

To tell onAirNow that currently no song is playing just make your uploading program send an empty file to your server or let it write <idle> to onAirNow.track. If this isn’t possible on your setup you can tell onAirNow to consider the uploaded information outdated after a specific period of time. If a timeout is set, onAirNow tries to read the song length first and uses the user-set timeout as a backup in case the song length is not specified.

Users of Apple computers may need to check the “Mac User” option on the plugin’s options page if their program uploads MacRoman formatted files. You’ll notice this when characters like “äÖ懛” are not displayed at all or substituted with a wrong character.

Customize the Look of onAirNow

Inside this plugin’s directory there is a file named onAirNow.css. You can copy it to your theme’s directory (then it is used instead of the default) and customize the look of the onAirNow inserted text. The actual content is editable on the options page. You can also toggle the display of the album name and the cover art (its URL must be set inside the <image> tag).

onAirNow: album name on an extra line

You can change the appearance of onAirNow by editing the CSS in onAirNow.css. The CSS file is documented so it should be easy to customize.

The text or HTML which should be displayed when you don’t listen to music can be configured on onAirNow’s options page, too. You can also decide whether you want nothing to be displayed during an idle music player.


Please leave a comment on this page to provide feedback and suggestions or ask for help. But keep in mind that I do this in my spare time so don’t expect me to answer your questions immediately. Please report bugs via the contact page.

I’d also like to hear from everyone who has integrated this plugin into their blog. Just leave a comment with your URL!


This plugin is provided as is. Though I did my best to produce a plugin of good quality I can’t guarantee that this plugin is safe, secure or error free. Use it at your own risk and always make a backup copy of your blog before trying new plugins or themes!


Download this plugin as a ZIP file, unzip it and copy the onAirNow folder to your blog’s plugin directory.

Download onAirNow 1.8

Release Notes

onAirNow 1.8 (29th July, 2007): changes since version 1.7f

  • Fixed the CSS inclusion code: the plugin’s directory can now be renamed to something different than “onAirNow”.
  • Song length can now have the format hh:mm:ss, mm:ss or just seconds.
  • fixed the timeout logic
  • Delayed timeout by 5 seconds to give the track info a chance to be updated in case of any delay (media player, upload, server).

onAirNow 1.7f (fix-release) (1st March, 2007): changes since version 1.7

  • Fixes a bug which prevented the removal of the title link

onAirNow 1.7 (28th February, 2007): changes since version 1.6

  • some CSS tweaks
  • Control panel quick link fixed in WordPress 2.1

onAirNow 1.6 (never released): changes since version 1.5

  • Added an option to display the song info only on the homepage.
  • Added widget support so there’s no need to add code to your theme’s PHP files. (thanks David Goldstein)
  • Added a link to my onAirNow page through the “On Air Now” title. Thank you for leaving it there!
  • some CSS tweaks (line-height)

Read older release notes on the next page…

[Next page]

70 Responses to “onAirNow”

  1. billythekid says:

    Hi, thanks for the great plugin. I’ve integrated a plugin to my mIRC mp3 player to create and upload the file. This is just what the doctor ordered!

    Great stuff! Perfect!


  2. Trackback from billy.the-kid.org » Blog Archive » WP MP3 Player

    […] Added compatibility for the onAirNow WordPress […]

  3. Trackback from   50 Multimedya Worldpress plugin by # YaMTaR

    […] onAirNow […]

  4. Trackback from 50 plugins para manejo multimedia en Wordpress « COMPU-RECURSOS

    […] onAirNow – Muestra una lista de lo último que has escuchado en iTunes o Winamp. […]

  5. Trackback from WORDPRESS GOD:300+ Tools for Running Your WordPress Blog

    […] onAirNow – Now playing plugin that displays most recent song from iTunes or WinAmp. […]

  6. Trackback from voozzy.com » Blog Archive » Плагины для WordPress

    […] список станций, закладки по мелодиям и исполнителям. onAirNow – плагин показывающий самые последние композиции […]

  7. synthpop says:

    great! recommended.

  8. Trackback from WordPress 收藏 » 让WordPress更加丰富的多媒体插件

    […] onAirNow – 显示iTunes 或 WinAmp的播放列表 […]

  9. Trackback from On-line дневник оптимизатора » Архив блога » Плагины для Wordpress с описанием на русском в 3-х частях. Часть 2.

    […] список станций, закладки по мелодиям и исполнителям. onAirNow – плагин показывающий самые последние композиции […]

  10. Trackback from WordPress Plugins - Article | Chaos Region | Incorporated

    […] onAirNow, apabila anda pengguna iTunes atau WinAmp, maka plugin ini akan memperlihatkan apa yang anda […]

  11. Ian Archambeau says:

    How to get this working with AMIP – really easy!

    Essentially follow this tutorial: http://amip.tools-for.net/oldhelp/web.htm

    DO NOT DOWNLOAD cURL with SSL!! This gave me a DLL error, just take a normal WIN 32 generic version.

    Then make your in.html (i renamed mine onAirNow.track.temp) look like so:

    then change in.html to onAirNow.track.

    Modify cUrl command accordingly and your off!

    Can be seen in action here: http://www.fieldjournal.co.uk

  12. Ian Archambeau says:

    Oh I should also add! Make all your irc presets contain the commands:
    /exec:(c:\amipweb\curl.exe)-B -T out.html -u : ftp:////

    i found that it kept jumping between them, despite random preset wasn’t selected!

  13. Trackback from WP Plugins March 27, 2007 &laquo; PolarityII

    […] onAirNow gets information about your currently playing track from a file uploaded via FTP and displays it on your blog. […]

  14. Trackback from 300+ Tools for Running Your WordPress Blog : Freshweblab Network

    […] onAirNow – Now playing plugin that displays most recent song from iTunes or WinAmp. […]

  15. Tony says:

    Really like this plugin. But I’m having a small problem. I’m getting information other than album info in the output.

    Example: ” « by (Album: / 1985) ”

    What should I edit and where exactly? Your help would be appreciated.

  16. (post author) Daniel Gattermann says:

    Please e-mail me directly with more details if you still have problems.

  17. Raul says:

    Hey man thank u for this awesome plugin! I had some problems but after a few hours I’m OK, is working :P Check it at my brand new website. By the way, I managed to make it work by using both dosomething plugin and AMIP. If anyone needs help setting up onAirNow on his/her blog, just let me know and I’ll try to help. Thing is Daniel that I wonder if there’s a way for the plugin to update the media being played in real time, displaying the time and all that?

  18. alec says:

    Love this plug in I had no trouble at all getting it to work. I wonder, though if there is a way to get it to check the file on a timer and update the widget with ajax, maybe. If you’ve tried this could you let me know?

  19. (post author) Daniel Gattermann says:

    Alec, onAirNow doesn’t support AJAX. The simple reason is I don’t think a visitor is interested in the changing of your currently playing song. Furthermore a visitor most likely won’t view the same page long enough to even encounter the change. This is why I won’t implement a “live refresh” on onAirNow.

  20. Abigail says:

    Just wanted to drop a note and say thank you. We’re implementing this on our site next week. So far we’ve had no problems!


314 posts. 18 pages. 427 comments. 53 categories. 39 queries. 0.820 seconds.
Blog © 2005-2018 Daniel M. Gattermann. Logos, trademarks, etc. © by their respective owners.