Category
- 1/43 Car's (246)
- Bouldering (14)
- Camera (32)
- Computer (41)
- Everyday (134)
- Goods (12)
- Linux (49)
- Music (32)
- Photo (65)
- Plant (33)
- Plastic Model (58)
- Trekking (43)
- WordPress (35)
It's blog written about Trekking ,1/43 MiniCar , Plastic Model , Photo , Computing.
RSSNHKのらじるらじるが聞けるようにして、選局中の放送局がわかる様に、
もう少しバージョンアップしてみました。
nowplay.htmlという選局した局名を書いたHTMLを出力して、iframeで表示しました。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
<?php //radiko player //http://www.nakatayuki.com/ //https://rabbitrider.net/grasshopper/ $file = 'nowplay.html'; if(isset($_GET['men'])){ $id=$_GET['men']; if($id=="FMFUKUOKA"){ exec("killall mplayer"); exec("play_radiko.sh FMFUKUOKA > /dev/null 2>&1 &"); $current = '<p style="text-align: center;color:#ff0000">FM FUKUOKA</p>'; }else if($id=="LOVEFM"){ exec("killall mplayer"); exec("play_radiko.sh LOVEFM > /dev/null 2>&1 &"); $current = '<p style="text-align: center;color:#ff0000">LOVE FM</p>'; }else if($id=="CROSSFM"){ exec("killall mplayer"); exec("play_radiko.sh CROSSFM > /dev/null 2>&1 &"); $current = '<p style="text-align: center;color:#ff0000">CROSS FM</p>'; }else if($id=="RKB"){ exec("killall mplayer"); exec("play_radiko.sh RKB > /dev/null 2>&1 &"); $current = '<p style="text-align: center;color:#ff0000">RKB</p>'; }else if($id=="KBC"){ exec("killall mplayer"); exec("play_radiko.sh KBC > /dev/null 2>&1 &"); $current = '<p style="text-align: center;color:#ff0000">KBC</p>'; }else if($id=="NHK1"){ exec("killall mplayer"); exec("play_nhk.sh r1 > /dev/null 2>&1 &"); $current = '<p style="text-align: center;color:#ff0000">NHK 1</p>'; }else if($id=="NHK2"){ exec("killall mplayer"); exec("play_nhk.sh r2 > /dev/null 2>&1 &"); $current = '<p style="text-align: center;color:#ff0000">NHK 2</p>'; }else if($id=="NHKFM"){ exec("killall mplayer"); exec("play_nhk.sh fm > /dev/null 2>&1 &"); $current = '<p style="text-align: center;color:#ff0000">NHK FM</p>'; } file_put_contents( $file , $current); } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" dir="ltr" lang="ja"><head profile="http://gmpg.org/xfn/11"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <head> <link rel="shortcut icon" href="icon.png" /> <meta http-equiv="Pragma" content="no-cache"> <meta http-equiv="Cache-Control" content="no-cache"> <meta http-equiv="Expires" content="0"> <title>radiko Tuner</title> </head> <body style="color:#00ff00;background-color:#000000;font-size:medium;font-style:normal"> <h1> <p style="text-align: center;">Raspberry Pi<br>radiko Tuner</p> </h1> <hr> <form action="radiko.php" method="get"> <p style="text-align: center;"><input type="radio" name="men" value="FMFUKUOKA">FM FUKUOKA <input type="radio" name="men" value="LOVEFM">LOVE FM <input type="radio" name="men" value="CROSSFM">CROSS FM <input type="radio" name="men" value="NHKFM">NHK FM <br> <input type="radio" name="men" value="NHK1">NHK 1 <input type="radio" name="men" value="NHK2">NHK 2 <input type="radio" name="men" value="RKB">RKB <input type="radio" name="men" value="KBC">KBC <br><br><input type="image" src="play.png" name="play"></p> </form> <p style="text-align: center;">Now PLay<br><iframe src="nowplay.html" width="140" height="35" frameborder="0" scrolling="no" ></iframe></p> <?php $file = 'nowplay.html'; if(isset($_GET['stop'])){ $id=$_GET['stop']; if($id=="STOP"){ exec("killall mplayer"); $current = '<p style="text-align: center;color:#ff0000">-----</p>'; file_put_contents( $file , $current); } } ?> <form action="radiko.php" method="get"> <p style="text-align: center;"><input type="image" src="stop.png" name="stop" value="STOP"></p> <hr> </form> </body> </html> |