3 $url = 'http://www.ssps.cz/pages/rozvrhy/index.php';
6 function rss_add_item($title, $link='', $desc='') {
8 echo("\t<title>$title</title>\n");
9 echo("\t<link>$link</link>\n");
10 echo("\t<description>$desc</description>\n");
14 <?php
echo('<?xml'); ?
> version
="1.0" encoding
="windows-1250"?
><rss version
="0.91"><channel
>
16 <title
>Zmeny v rozvrhu SSPS
</title
>
17 <link
><?php
echo($url); ?
></link
>
18 <description
>Aktualni zmeny v rozvrhu SSPS
</description
>
19 <language
>cs
</language
>
22 $croom = str_replace('.', '\.', $croom);
23 $feed = spliti('<.?..>', file_get_contents($url));
25 foreach($feed as $line) {
27 if($line == '' ||
eregi('rozvrhy', $line)) continue;
28 if(eregi($croom, $line)) rss_add_item($line, $url);