About
Broadcasters
Free Trial
Purchase
News
Documentation
OAS Audio API

Interacting with Playout (cont)...

Making the Playout Database accessible

Operationally, the key concept is outlined above - in essence the first stumbling block is that you need to make the Playout database accessible to not only the Playout suite of software but to a publically accessible web server (with the necessary scripting support). This can prove difficult particularly if your webserver is itself only accessible via the internet. In short a mechanism has to be in place to enable the blue & orange connecting arrows into the database.

As has been previously mentioned on one of the About pages, the Playout database as an ODBC compliant database and "out of the box" is a standard Microsoft Access database. This means that the infrastructure is in place to enable any server side, database aware language (such as PHP) to connect to, query and manipulate data in this database. The simplest solution to this then is to relocate the database to a central file server that is network accessible (using standard Microsoft networking) by both the Playout machine and the web server itself. Those of you already using Playout in a networked environment will probably have already accomplished this such that multiple machines can communicate with the database, for everyone else there are sections in the help and user guide (see section 7) on how to achieve this - in essence it involves moving the audio.mdb file from it's default location to one on a server and telling Playout where this file can be found.

The next step is to write some server side script to connect to the databse using your language of choice - as previously mentioned all the examples in this article use PHP. This connects to Microsoft Access using the ODBC function interface. On Win32 platforms, this requires you to setup a DSN first, then use PHP to connect to this DSN - there is a good example on how to achieve this here. The DSN you create will need to point to the Playout database (audio.mdb) held either locally or via a networked drive.

Before going too much further it's worth mentioning that you may run into issues of a security/interoperability nature when using MS-Access in this manner - for example if your webserver is hosted on a Unix/Linux platform it may be impossible for it to connect to the MS-Access database. With this in mind, Playout also supports deployoment of it's database on a PostgreSQL or MySQL server - information is included with the package on how to go about this.

With this in mind, the sample PHP scripts which follow were based around a MySQL hosted database since that's what we used for Hastings Rock and as such utilises the PHP MySQL API rather than the ODBC one. However the function's should read across without too much difficulty, for example to connect to a MySQL database you would use mysql_connect and for ODBC (MS-Access) use odbc_connect.

Next: Putting the scripts together

 

©2020 OnAStickSoftware, Comments to: playout@onasticksoftware.co.uk