The following works to lauch mplayer streaming some URL by clicking it (from a list of such URLs in an .html or .txt file). It could use some improving, like including the useful part of mplayer's output (but no cache fill... etc).
Code:
#!/bin/sh
# This is file /mnt/us/www/cgi-bin/mplay
# call using (replace host/stream/Station):
# <a href="http://localhost/cgi-bin/mplay?http://host/stream">Station</a>
echo 'Content-type: text/plain'
echo ''
INSTALLDIR=/mnt/us/mplayer
NICENESS="-10"
FIFO=/tmp/mplayer.fifo
MPLAYER="nice -n$NICENESS $INSTALLDIR/mplayer -ao alsa -slave -quiet -input file=$FIFO"
test -z `pidof mplayer` || killall mplayer >/dev/null 2>&1
test -e $FIFO || mkfifo $FIFO
($MPLAYER -playlist "$1" >/dev/null 2>&1) &
echo "Now playing $1 ..."