1 <!-- play music on hackstation ... -->
5 if [ ! -z \"`echo $REMOTE_ADDR | grep '^192.168.10'`\" ]; then
6 echo \"connection from $REMOTE_ADDR allowed.<br><br>\";
7 if [ ! -z \"$QUERY_STRING\" ]; then
8 url=`echo '$QUERY_STRING' | awk -F\& '{ gsub(\"url=\",\"\"); print $1 }'`;
9 user=`echo '$QUERY_STRING' | awk -F\& '{ gsub(\"user=\",\"\"); print $2 }'`;
10 passwd=`echo '$QUERY_STRING' | awk -F\& '{ gsub(\"passwd=\",\"\"); print $3 }'`;
11 if [ -z \"`ps -ef | grep [m]player | grep -v 'bin\/sh'`\" ]; then
12 play_cmd=\"/usr/bin/mplayer -user $user -passwd $passwd $url\";
13 echo \"trying: $play_cmd<br><br>\";
14 /usr/bin/mplayer -user $user -passwd $passwd $url > /dev/null 2>&1;
16 echo \"mplayer allready running ...\";
20 echo \"sorry, connection from $REMOTE_ADDR not authorized! go away.<br><br>\";