Host Your Own Music Playlist with Opentape


Beloved music playlist hosting service Muxtape‘s gone offline to “sort out a problem with the RIAA,” but if you’ve got some web server space, you can host, stream, and share your own digital music mixes Muxtape-style with newly-launched PHP web application Opentape. Opentape isn’t affiliated with Muxtape in any way, but it’s wildly similar, boasting a sparse, easy-to-use interface with drag-and-drop song rearrangement. To run Opentape, you’ve got to have a web server running PHP5 (or set up your own at home), and install Opentape on it. Let’s take a closer look.


Note: To proceed, you need a web server with FTP access and know how to upload files, and change folder permissions on it.

Installing Opentape

As far as installing your own hosted web application goes, Opentape is pretty easy. Before you get started, make sure you’ve got a web server running PHP5 with the curl extension installed. (You can use phpinfo(); to see what extensions are available in your PHP setup. If you don’t have curl, but you’re willing to edit some code, there is a workaround.) All set?

Download the Opentape .zip file and extract it on your web server. If you navigate to http://yourserver.com/yourpath/opentape/, you’ll get an error about directory permissions, as shown:

To fix that, in the /opentape/ folder, set the permissions on the /settings/ and /songs/ folders to 077, as shown. (I’m using WinSCP in the screenshot; you can just right-click on the folder and adjust permissions in the Properties dialog.)

Now you’ll set a password on your Opentape installation so only authorised users can create a “tape” and upload songs.

Save your password, and Opentape will send you along. At this point, if you get a PHP error that reads something like “Fatal error: Call to undefined function curl_init()” it means you don’t have the curl extension for PHP installed. Skip down to the workaround and then come back up here when you’re done.

Finally, the fun part: Name your mix tape, give it a description, a colour, and start uploading songs to it. I had more luck just FTP’ing MP3 files to the /songs directory myself, but you have a choice between the web-based upload tool and your trusty FTP client.

Once you’ve uploaded all the songs for your mix—whether by FTP or web page—you can rearrange them into the order you want. Just click and drag the songs into your desired order on-page. Here’s what that looks like:

To listen to your new tape, just click on the “Your Tape” link or navigate to the /opentape/ directory on your web server—then click on a song to listen. Here’s what mine wound up looking like. (I’d link it, except I fear for my bandwidth bills.)

While Opentape is pretty sparse in the options department, it does let you do two key things: embed your playlist on another web site, and include direct MP3 download links from it. (Can you already hear the bandwidth overage happening?) Click on the Settings link to get the embed code and the direct link option (which is off by default).

No curl Extension Workaround

If you’re getting the dreaded “Fatal error: Call to undefined function curl_init()” error when you visit your Opentape installation, you’re in the right place. You can get Opentape to mostly work without curl, but application auto-updates will not work. To disable the auto-updates and set up Opentape sans curl, in the /code/opentape_common.php file, comment out the line that reads :

//$result = do_post_request(constant("ANNOUNCE_SONGS_URL"), $data, null);

By adding those two forward slashes to the front of it. Then, add a line immediately after that one which reads:

$result="OK";

Then, in the code/edit.php file AND the code/settings.php file AND the code/login.php file, comment out the whole section that checks for Opentape updates, like so:

/*
if ( ((time() - $prefs_struct['last_update_check'] ) > 604800) &&
(!isset($prefs_struct['check_updates'] ) || $prefs_struct['check_updates']== 1 )
) {
$prefs_struct = check_for_update();
if ($prefs_struct===false) { header("Location: " . $REL_PATH . "code/warning.php"); }
}
*/

Now you should be able to refresh your Opentape directory and clear the PHP error.


This is only Opentape’s first release, so things can only get better from here. (My wishlist for future releases off the top: No curl dependencies, and multiple playlists.) How do you stream and share your music over the interwebs? Tell us in the comments.


The Cheapest NBN 50 Plans

Here are the cheapest plans available for Australia’s most popular NBN speed tier.

At Lifehacker, we independently select and write about stuff we love and think you'll like too. We have affiliate and advertising partnerships, which means we may collect a share of sales or other compensation from the links on this page. BTW – prices are accurate and items in stock at the time of posting.

Comments


Leave a Reply