- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
# cat radiom
#!/usr/bin/php -q
<?php
$rss=simplexml_load_file('http://www.moskva.fm/rss/onair.xml') or die($errno);
foreach($rss->channel->item as $item) {
$item->title;
$item->description;
if (!strstr($item->title,$argv[1])){continue;} else
{
preg_match_all('/^([0-9]{1,2}:[0-9]{1,2})\s<.+\/\">(.+)<\/a>\s.+\">(.+)<\/a>$/',$item->description,$found);
echo "\n$item->title ";
echo "Time: ".$found[1][0]." Group: ".$found[2][0]." Song: ".$found[3][0]."\n"; exit();}
}
echo "no search this radio\n";
?>
Комментарии (0) RSS
Добавить комментарий