/* TTP Listen Form V1.0 December 3, 2001 brought to you by the programming team at The Test Pattern: Express Yourself http://www.thetestpattern.com Home of Test Pattern Radio! Contact: We would appreciate any comments or improvements you may have conserning this script. Please email us at scripts@thetestpattern.com. If you decide to use this script on your site, we would appreciate a note. License: This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Description: This script is designed for internet stations which broadcast two streams simultaneously, E.G. one with content for broadband listeners and another with content for modem listeners. The user selects his/her stream quality and player, and submits the form. The script takes that submitted data and sends appropriate headers and data to launch the correct player. The script assumes that the streams are being broadcast in a format which all players can handle, such as mp3. Variables to Edit You must edit the $HighURL and $LowURL variables to point to the appropriate streams. The selected URL is passed to the selected player. You may also wish to edit the PrintForm() function to display your own html, particularly the title. */ // url's of streams $HighURL = "http://66.28.48.73:10480"; $LowURL = "http://66.28.48.80:10400"; if (($bpref == 0) || ($ppref == 0)) { PrintForm(); exit; } // send appropriate header if ($ppref == 1) header("Content-Type: audio/x-mpegurl"); if ($ppref == 2) header("Content-Type: audio/x-pn-realaudio"); if ($ppref == 3) header("Content-Type: audio/x-asf"); // send appropriate URL if ($bpref == 1) echo $LowURL; if ($bpref == 2) echo $HighURL; // this prints the form. function PrintForm() { echo "
"; echo "Select your preferences in the following form. The correct player and stream quality will be chosen and used.