You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

23 lines
405 B

<?php
if (isset($_POST['radio'])) {
radioControl($_POST['radio']);
}
function radioControl($digit) {
switch ($digit) {
case '1':
shell_exec('mpc play 1');
break;
case '2':
shell_exec('mpc play 2');
break;
case '3':
shell_exec('mpc play 3');
break;
default:
shell_exec('mpc stop');
break;
}
}
?>