docs
[mirrors/Programs.git] / php / rozvrh.rss.php
1 <?php
2
3 //URL Stránky s rozvrhy
4 $url = 'http://www.ssps.cz/pages/rozvrhy/index.php';
5
6 $fp = fopen('http://www.ssps.cz/pages/rozvrhy/index.php', 'r');
7 while(!feof($fp)) {
8 $line = fgets($fp);
9 //echo $line;
10 if(eregi('Aktualizováno', $line)) {
11 $line = str_replace('</DIV>', '', $line);
12 $line = str_replace('&nbsp;', ' ', $line);
13 $line = trim($line);
14 //echo("<!-- $line -->\n");
15 break;
16 }
17 }
18
19 echo('<?xml version="1.0" encoding="ISO-8859-2"?>');
20 ?>
21 <rss version="0.91"><channel>
22
23 <title>Zmeny v rozvrhu SSPS</title>
24 <link>http://www.ssps.cz/pages/rozvrhy/index.php</link>
25 <description>Aktualni zmeny v rozvrhu SSPS</description>
26 <language>cs</language>
27
28 <item>
29 <title><?php echo($line); ?></title>
30 <link>http://www.ssps.cz/pages/rozvrhy/index.php</link>
31 <description><?php echo($line); ?></description>
32 </item>
33
34 </channel></rss>
35
36
This page took 0.259765 seconds and 4 git commands to generate.