-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathautosalonhd.php
More file actions
59 lines (38 loc) · 1.36 KB
/
autosalonhd.php
File metadata and controls
59 lines (38 loc) · 1.36 KB
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
<?php echo "<?xml version='1.0' ?>"; ?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<mediaDisplay>
<text offsetXPC=5 offsetYPC=6 widthPC=50 heightPC=6 fontSize=20 backgroundColor=-1:-1:-1 foregroundColor=250:250:250>
Prima Autosalon HDTV</text>
</mediaDisplay>
<channel>
<title>Prima Autosalon HDTV</title>
<menu>main menu</menu>
<?php
$html = file_get_contents("http://www.autosalontv.cz");
$videos = explode('<tr class="radek-dil">', $html);
unset($videos[0]);
$videos = array_values($videos);
foreach($videos as $video) {
$t1 = explode('<img src="', $video);
$t2 = explode('"', $t1[1]);
$nahled = $t2[0];
$t1 = explode('year=', $video);
$t2 = explode('&', $t1[1]);
$rok = $t2[0];
$t1 = explode('week=', $video);
$t2 = explode('"', $t1[1]);
$tyden = $t2[0];
$t1 = explode('>AUTOSALON', $video);
$t2 = explode('<', $t1[1]);
$titulek = $t2[0];
echo '<item>';
echo '<title>AUTOSALON'.$titulek.'</title>';
echo '<link>mms://bcastd.livebox.cz/up/as/'.$rok.'/'.$tyden.''.$rok.'.wmv</link>';
echo '<enclosure type="video/wmv" url="mms://bcastd.livebox.cz/up/as/'.$rok.'/'.$tyden.''.$rok.'.wmv"/>';
echo '<media:thumbnail url="http://www.autosalontv.cz'.$nahled.'" />';
echo '</item>';
echo "\n";
}
?>
</channel>
</rss>