Re: PHP M3U Generator with Auto Timeout for Streaming Audio

  • From: "inthaneelf" <inthaneelf@xxxxxxxxxxxxxx>
  • To: <programmingblind@xxxxxxxxxxxxx>
  • Date: Fri, 16 Nov 2007 09:32:00 -0800

alright, got it, thanks, and am filing this for future reference, smile.

inthane

. For Blind Programming assistance, Information, Useful Programs, and Links to Jamal Mazrui's Text tutorial packages and Applications, visit me at:
http://grabbag.alacorncomputer.com
. to be able to view a simple programming project in several programming languages, visit the Fruit basket demo site at:
http://fruitbasketdemo.alacorncomputer.com

----- Original Message ----- From: "Bryan Garaventa" <bgaraventa11@xxxxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Friday, November 16, 2007 12:08 AM
Subject: Re: PHP M3U Generator with Auto Timeout for Streaming Audio


No, the original page earlier in the thread will still work for downloading the script, at
http://gutterstar.net/cgi-bin/m3u_streamer.htm
The download link is at the bottom of the page.
Best wishes,
Bryan
----- Original Message ----- From: "inthaneelf" <inthaneelf@xxxxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Thursday, November 15, 2007 10:29 PM
Subject: Re: PHP M3U Generator with Auto Timeout for Streaming Audio


we have to have a membership to download it now?

inthane
. For Blind Programming assistance, Information, Useful Programs, and Links to Jamal Mazrui's Text tutorial packages and Applications, visit me at:
http://grabbag.alacorncomputer.com
. to be able to view a simple programming project in several programming languages, visit the Fruit basket demo site at:
http://fruitbasketdemo.alacorncomputer.com

----- Original Message ----- From: "Bryan Garaventa" <bgaraventa11@xxxxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Thursday, November 15, 2007 10:06 PM
Subject: Re: PHP M3U Generator with Auto Timeout for Streaming Audio


Thanks, I've made some pretty important changes to the script, and added some fairly powerful functionality. I've pasted the instruction file text below if it is of interest. Though, the actual links are located at http://gutterstar.net/dynamic_m3u.php

// Help file documentation...

Welcome to the GutterStar.net Dynamic M3U Generator With Auto-Timeout!

Introduction

To give you an example of what this PHP script actually does... The following link will trigger an M3U playlist to be dynamically created. (The streaming
audio that is being indexed, is the same as is available from our
Streaming Alternative Rock Page
.) This will cause all of the MP3 audio files within a folder on the server to be indexed, dynamically written to an M3U file, then opened in your default
media player!

That's right! These audio files are not being indexed from a static M3U playlist, but rather, are being generated from scratch based on the mp3 files within the audio folder itself. If any of the audio files are deleted, renamed, or more audio files are added, the changes will automatically be reflected within
this dynamically generated M3U playlist.

As if this functionality weren't enough, check this out... When the M3U playlist is created, it includes an automatic timeout feature, which causes the audio stream to timeout after a set interval. The timeout length is totally customizable! For example, you could timeout the stream after 35 seconds, 1
hour and 2 minutes, 1 day and 3 hours, or whatever you like!

Even more, there are built in security features that prevent your listeners from being able to directly download your audio files, or even be able to tell
where they are actually located on the server!

So generate the playlist and start playing to try it out!

In the example implementation above, the current settings will cause the audio stream to time out after 1 hour has elapsed. This countdown will always start at the moment when the link for the script is activated, which will be different for each user. This functionality is truly awesome! When this time out occurs, the user will not be able to listen to anymore of the audio stream without reactivating the script. These settings are fully configurable however,
to fit your needs.

How to Configure

To configure the script for your website, simply edit the file named "stream_config.php". An excerpt from the code contained within this file follows...


/*
To begin streaming mp3 audio from your website:
1. Configure the variables below.
2. Upload all of these files to the folder where you want to access the script. All should reside within the same logical folder.
3. Create a link to the file named "stream_gen_m3u.php"
*/

// The URL path of the folder where your audio files reside. This path must not end with a "/"
$url_path = 'http://domain.com/folder';

// The relative folder where the audio files are located. This path must start where this script originates, and point to the same location as indicated
above. Must not end with a "/".
$folder_path = './folder';

// The extention of your audio files. This must not begin with a "."
$extension = 'mp3';

// The URL path that points to "stream.php"
$stream_url = 'http://domain.com/stream.php';

// The relative path and file name of the schedule script file. This should be fine if left within the same folder as "stream.php"
$schedule_file = './stream_schedule.php';

// The relative path and file name of the M3U file. This will automatically be created.
$m3u_file = './stream_m3u.m3u';

// Set how often the audio stream will expire, so visitors will have to return to your site to continue listening. // The time will automatically be incremented by whatever numbers you specify below. // As an example, the default value below, will cause the audio stream to timeout after 1 hour, 30 minutes, and 45 seconds after the script first runs.

// The specified number of months.
$time_months = 0;
// The specified number of days.
$time_days = 0;
// The specified number of hours.
$time_hours = 1;
// The specified number of minutes.
$time_minutes = 30;
// The specified number of seconds.
$time_seconds = 45;

// Encode string, this will encode the Authorization code to prevent tampering within the playlist. // This string must consist of ten individual letters. You can also change the case of individual letters to increase the security.
// Make sure that there are no repeat characters, and no spaces.
$security_string = 'abcdefghij';

// After uploading this file, set the permission to deny all Read access. Usually 600 will work for this.

Download

To download the latest version of the GutterStar.net Dynamic M3U Generator with Auto-Timeout,
click here!

Copyright
GutterStar.net,
all rights reserved.
----- Original Message ----- From: "inthaneelf" <inthaneelf@xxxxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Tuesday, November 13, 2007 6:45 PM
Subject: Re: PHP M3U Generator with Auto Timeout for Streaming Audio


thank you, smile

inthane
. For Blind Programming assistance, Information, Useful Programs, and Links to Jamal Mazrui's Text tutorial packages and Applications, visit me at:
http://grabbag.alacorncomputer.com
. to be able to view a simple programming project in several programming languages, visit the Fruit basket demo site at:
http://fruitbasketdemo.alacorncomputer.com

----- Original Message ----- From: "Bryan Garaventa" <bgaraventa11@xxxxxxxxxxxxxx>
To: <programmingblind@xxxxxxxxxxxxx>
Sent: Tuesday, November 13, 2007 5:18 PM
Subject: PHP M3U Generator with Auto Timeout for Streaming Audio


In case people are interested, I've pasted the config file below. This should give you an idea what it actually does.


To see it in action, plus the download link, simply visit http://gutterstar.net/cgi-bin/m3u_streamer.htm Eventually there will be a download page on the site, but I haven't got around to it yet.



Config file code

<?

/*

To begin streaming mp3 audio from your website:

1. Configure the variables below.

2. Upload all of these files to the folder where you want to access the script. All should reside within the same logical folder.

3. Create a link to the file named "stream_gen_m3u.php"

*/

// The URL path of the folder where your audio files reside. This path must not end with a "/"

$url_path = 'http://domain.com/audio/folder';

// The relative folder where the audio files are located. This path must start where this script originates. Must not end with a "/".

$folder_path = './audio/folder';

// The extention of your audio files. This must not begin with a "."

$extension = 'mp3';

// The URL path that points to "stream.php"

$stream_url = 'http://domain.com/stream.php';

// The relative path and file name of the authorization code file. Will automatically be created.

$auth_file = './stream_auth_code.php';

// The relative path and file name of the schedule script file.

$schedule_file = './stream_schedule.php';

// The relative path and file name of the M3U file. This will automatically be created.

$m3u_file = './stream_m3u.m3u';

// Set how often the audio stream will expire, so visitors will have to return to your site to continue listening.

// 1=Hour, 2= Day, 3=Week, 4=Month

$stream_expire = '1';

// After uploading this file, set the permission to deny all Read access. Usually 600 will work for this.

?>



__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind



__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind



__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind


__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind



__________
View the list's information and change your settings at //www.freelists.org/list/programmingblind

Other related posts: