-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnova_parser_link.php
More file actions
64 lines (46 loc) · 1.6 KB
/
nova_parser_link.php
File metadata and controls
64 lines (46 loc) · 1.6 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
60
61
62
63
64
<?php
require_once ("./include/browseremulator.class.php");
function openpage ($rowurl) {
$be = new BrowserEmulator();
$be->addHeaderLine("Referer", "http://tv.nova.cz/"); // volani odkud jsi na stranku prisel. pouzij nejakou jejich vychozi stranku.
$file = $be->fopen($rowurl);
while ($line = fgets($file, 1024)) {
$_page.=$line;
}
fclose($file);
if ($_page == "") return FALSE;
return $_page;
}
$link = $_GET["file"];
echo "<?xml version='1.0' ?>\n";
echo "<rss version=\"2.0\" xmlns:dc=\"http://purl.org/dc/elements/1.1/\">\n";
if (($html = openpage($link) ) != FALSE) {
$ItemsOut .= "<channel>\n<title>NOVA Archiv</title>";
$t1 = explode('media_id = "', $html);
$t2 = explode('"', $t1[1]);
$mediaid = $t2[0];
$t1 = explode('site_id = ', $html);
$t2 = explode(';', $t1[1]);
$siteid = $t2[0];
$config = "http://tn.nova.cz/bin/player/serve.php?media_id=".$mediaid."&site_id=".$siteid;
if (($html = openpage($config) ) != FALSE) {
$t1 = explode('src="', $html);
$t2 = explode('"', $t1[1]);
$videosrc = $t2[0];
$t1 = explode('server="', $html);
$t2 = explode('"', $t1[1]);
$videoserver = $t2[0];
$urlhq = "rtmp://flash".$videoserver.".nova.nacevi.cz:80/vod?slist=mp4:".$videosrc;
$ItemsOut .= "
<item>
<title>Přehrát</title>
<link>http://127.0.0.1/nova.sh?url=".$urlhq."</link>
<enclosure type=\"video/mp4\" url=\"http://127.0.0.1/nova.sh?url=".$urlhq."\"/>
</item>\n";
}
$ItemsOut .= "</channel>\n</rss>";
echo $ItemsOut;
} else {
echo "TEST SELHAL !";
}
?>