Changeset 12 for Common/RSS.php
- Timestamp:
- Apr 7, 2020, 9:14:24 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
Common/RSS.php
r10 r12 12 12 function __construct() 13 13 { 14 $this->Charset = 'utf 8';14 $this->Charset = 'utf-8'; 15 15 $this->Items = array(); 16 16 } … … 18 18 function Generate() 19 19 { 20 Header('Content-Type: text/xml; charset=utf-8'); 20 21 $Result = '<?xml version="1.0" encoding="'.$this->Charset.'" ?>'."\n". //<? 21 '<rss version="2.0">'."\n".22 " <channel>\n".23 " <title>".$this->Title."</title>\n".24 " <link>".$this->Link."</link>\n".25 " <description>".$this->Description."</description>\n".26 " <language>cs</language>\n".27 " <webMaster>".$this->WebmasterEmail."</webMaster>\n".28 " <pubDate>".date('r')."</pubDate>\n".29 " <ttl>20</ttl>\n";22 '<rss version="2.0">'."\n". 23 " <channel>\n". 24 " <title>".$this->Title."</title>\n". 25 " <link>".$this->Link."</link>\n". 26 " <description>".$this->Description."</description>\n". 27 " <language>cs</language>\n". 28 " <webMaster>".$this->WebmasterEmail."</webMaster>\n". 29 " <pubDate>".date('r')."</pubDate>\n". 30 " <ttl>20</ttl>\n"; 30 31 foreach ($this->Items as $Item) 31 32 { … … 33 34 ' <title>'.htmlspecialchars($Item['Title'])."</title>\n". 34 35 ' <description>'.htmlspecialchars($Item['Description'])."</description>\n". 35 ' <pubDate>'.date('r',$Item['Time'])."</pubDate>\n".36 ' <link>'.$Item['Link']."</link>\n".36 ' <pubDate>'.date('r',$Item['Time'])."</pubDate>\n". 37 ' <link>'.$Item['Link']."</link>\n". 37 38 " </item>\n"; 38 39 }
Note:
See TracChangeset
for help on using the changeset viewer.