<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>That's Winnie</title>
	<atom:link href="http://www.thatswinnie.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thatswinnie.com</link>
	<description></description>
	<lastBuildDate>Sun, 27 Jun 2010 12:35:31 +0000</lastBuildDate>
	<language>de</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>iCalBirthdays 2.0.1</title>
		<link>http://www.thatswinnie.com/2010-06-27/icalbirthdays-2-0-1/</link>
		<comments>http://www.thatswinnie.com/2010-06-27/icalbirthdays-2-0-1/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 12:35:31 +0000</pubDate>
		<dc:creator>Winnie</dc:creator>
				<category><![CDATA[Automator-Actions]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[iCalBirthdays]]></category>

		<guid isPermaLink="false">http://www.thatswinnie.com/?p=164</guid>
		<description><![CDATA[Dieses Update von iCalBirthdays ist nur ein kleiner Bug [...]]]></description>
			<content:encoded><![CDATA[<p>Dieses Update von iCalBirthdays ist nur ein kleiner Bugfix, ohne neue Features.</p>
<p><img src="http://www.thatswinnie.com/img/icalbirthdays_screenshot_2_0_de.jpg" alt="Screenshot der Automator-Action iCalBirthdays 2.0.1" /></p>
<p>Download: <a href="http://code.google.com/p/icalbirthdays/downloads/list" target="_blank">http://code.google.com/p/icalbirthdays/downloads/list</a></p>
<p><span id="more-164"></span><br />
<em>Änderungen in dieser Version:</em></p>
<ul>
<li>Vertauschung der Alarm-Einträge in der deutschen Version korrigiert</li>
</ul>
<p></p>
<p><a href="http://www.thatswinnie.com/donate-spenden/"><img src="https://www.paypal.com/de_DE/i/btn/x-click-but04.gif" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thatswinnie.com/2010-06-27/icalbirthdays-2-0-1/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>iCalBirthdays 2.0</title>
		<link>http://www.thatswinnie.com/2010-03-06/icalbirthdays-2-0/</link>
		<comments>http://www.thatswinnie.com/2010-03-06/icalbirthdays-2-0/#comments</comments>
		<pubDate>Sat, 06 Mar 2010 13:33:19 +0000</pubDate>
		<dc:creator>Winnie</dc:creator>
				<category><![CDATA[Automator-Actions]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[iCalBirthdays]]></category>

		<guid isPermaLink="false">http://www.thatswinnie.com/?p=155</guid>
		<description><![CDATA[iCalBirthdays ist jetzt noch toller und besser! (natür [...]]]></description>
			<content:encoded><![CDATA[<p>iCalBirthdays ist jetzt noch toller und besser! (natürlich, sonst würde es ja keine neue Version geben) </p>
<p>Ich habe die Automator-Action für diese Version von AppleScript nach Cocoa portiert &#8211; also komplett neu geschrieben. Dabei habe ich nicht nur Fehler behoben, sondern auch die meist-gewünschten Verbesserungen eingebaut: so werden zum Beispiel jetzt die Geburtstage ab der Geburt eingetragen und man kann eine Automator-Action davorschalten um nur für bestimmte Personen oder Adressbuchgruppen Geburtstage zu bekommen.</p>
<p><img src="http://www.thatswinnie.com/img/icalbirthdays_screenshot_2_0_de.jpg" alt="Screenshot der Automator-Action iCalBirthdays 2.0" /></p>
<p>Download: <a href="http://code.google.com/p/icalbirthdays/downloads/list" target="_blank">http://code.google.com/p/icalbirthdays/downloads/list</a></p>
<p><span id="more-155"></span><br />
<em>Änderungen in dieser Version:</em></p>
<ul>
<li>komplett neu in Cocoa geschrieben</li>
<li>Filter nach Personen und Adressbuchgruppen über vorgeschaltete Automator-Action möglich (<a href="http://code.google.com/p/icalbirthdays/issues/detail?id=16" target="_blank">issue 16</a>)</li>
<li>Jahreskalender (<a href="http://code.google.com/p/icalbirthdays/issues/detail?id=8" target="_blank">issue 8</a>)</li>
<li>Erinnerung per E-Mail (<a href="http://code.google.com/p/icalbirthdays/issues/detail?id=9" target="_blank">issue 9</a>)</li>
<li>Geburtstage ab Geburt</li>
<li>Fehler in benutzerdefinierten Anzeigeformaten behoben (<a href="http://code.google.com/p/icalbirthdays/issues/detail?id=21" target="_blank">issue 21</a>, <a href="http://code.google.com/p/icalbirthdays/issues/detail?id=22" target="_blank">issue 22</a>, <a href="http://code.google.com/p/icalbirthdays/issues/detail?id=28" target="_blank">issue 28</a>, <a href="http://code.google.com/p/icalbirthdays/issues/detail?id=29" target="_blank">issue 29</a>)</li>
<li>&#8220;Kalender in Datei exportieren&#8221;-Option entfernt</li>
</ul>
<p></p>
<p><a href="http://www.thatswinnie.com/donate-spenden/"><img src="https://www.paypal.com/de_DE/i/btn/x-click-but04.gif" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thatswinnie.com/2010-03-06/icalbirthdays-2-0/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Kölner Jugendchor St.Stephan</title>
		<link>http://www.thatswinnie.com/2010-01-29/kolner-jugendchor-ststephan/</link>
		<comments>http://www.thatswinnie.com/2010-01-29/kolner-jugendchor-ststephan/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 14:08:00 +0000</pubDate>
		<dc:creator>Winnie</dc:creator>
				<category><![CDATA[Webseiten]]></category>
		<category><![CDATA[Director]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Webseite]]></category>

		<guid isPermaLink="false">http://localhost:8888/thatswinnie/?p=17</guid>
		<description><![CDATA[Der "interne" Bereich für die Mitglieder des Kölner J [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.thatswinnie.com/img/kjc_big.jpg" title="Kölner Jugendchor St.Stephan" class="thickbox"><img src="http://www.thatswinnie.com/img/kjc_small.jpg" alt="Kölner Jugendchor St.Stephan" border="0" align="left" /></a>Der &#8220;interne&#8221; Bereich für die Mitglieder des Kölner Jugendchor St.Stephan informiert den eingeloggten Benutzer über Termine, stellt aktuelle Fotos zur Verfügung und bietet die Möglichkeit sich über andere Chormitglieder zu informieren. Zusätzlich gibt es ein Gästebuch und ein Memory-Spiel mit Highscore.<br />
Die Seite wurde mit PHP und Datenbanken und das Spiel mit Macromedia Director realisiert. In der Administrationsoberfläche können ausgewählte Benutzer die Daten pflegen.</p>
<p>Die Webseite sowie der interne Bereich wurden inzwischen komplett überarbeitet und basieren in der aktuellen Version nicht mehr auf meinem Code.</p>
<p><a href="http://www.koelner-jugendchor.de" target="_blank">www.koelner-jugendchor.de</a></p>
<div class="clearer"></div>
]]></content:encoded>
			<wfw:commentRss>http://www.thatswinnie.com/2010-01-29/kolner-jugendchor-ststephan/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Digitale Bücher für Deutschland: txtr eBook-Shop</title>
		<link>http://www.thatswinnie.com/2009-09-17/digitale-bucher-fur-deutschland-txtr-ebook-shop/</link>
		<comments>http://www.thatswinnie.com/2009-09-17/digitale-bucher-fur-deutschland-txtr-ebook-shop/#comments</comments>
		<pubDate>Thu, 17 Sep 2009 11:51:29 +0000</pubDate>
		<dc:creator>Winnie</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[DRM]]></category>
		<category><![CDATA[eBook]]></category>
		<category><![CDATA[ePub]]></category>
		<category><![CDATA[Shop]]></category>
		<category><![CDATA[txtr]]></category>

		<guid isPermaLink="false">http://www.thatswinnie.com/?p=110</guid>
		<description><![CDATA[Vornweg: ich liebe Bücher - aber nicht das Papier, auf [...]]]></description>
			<content:encoded><![CDATA[<p>Vornweg: ich liebe Bücher &#8211; aber nicht das Papier, auf dem es gedruckt wird und das immer viel zu viel Platz wegnimmt. Deswegen bin ich ein großer Verfechter der Digitalisierung und langsam aber sicher bewegt sich der deutsche Bücher-Markt in diese Richtung. Immer mehr Online-Buchhändler haben eBooks im Angebot (zum Beispiel <a href="http://www.thalia.de/shop/ebooks/show/" target="_blank">Thalia</a> und <a href="http://www.libri.de/shop/action/magazine/6/ebooks.html" target="_blank">Libri</a>). Jetzt ist der <a href="http://txtr.com/store" target="_blank">txtr eBook-Shop</a> als neuer Händler dazu gekommen und ich habe ihn ein wenig unter die Lupe genommen.<br />
<span id="more-110"></span></p>
<p>Wie ich dem Blog von txtr entnehmen konnte, hat der txtr eBook-Shop zur Zeit mehrere tausend Bücher im Angebot &#8211; unter ihnen kostenpflichtige und kostenlose, sowie deutsche und englische Titel. Die Bücher liegen im ePub-Format vor, welches seit kurzem auch von Sony-eBook-Readern unterstützt wird. Negativ ist, wie ich finde der DRM-Schutz der Bücher, mit dem die Nutzung und Verbreitung kontrolliert werden soll &#8211; auch wenn dieser nicht so restriktiv sein soll, wie zum Beispiel Apples Fairplay. Wegen dem DRM können die Bücher auch nicht über den eBook-Reader meiner Wahl Stanza auf dem iPhone gelesen werden &#8211; ein riesengroßes Manko.</p>
<p><a href="http://txtr.com/store" target="_blank"><img src="http://www.thatswinnie.com/wp-content/uploads/2009/09/txtr_shop-300x193.jpg" hspace="5" vspace="5" alt="txtr eBook-Shop" title="txtr eBook-Shop" width="300" height="193" align="left"  class="alignleft size-medium wp-image-120" /></a>Die Shop-Seite ist sehr übersichtlich und gut strukturiert. Über Kategorien kann man schön stöbern, aber auch direkt über die Suche zum Ziel kommen. Es gibt nicht, wie bei vielen anderen Shops üblich eine Blätterfunktion &#8211; alle gefundenen Bücher werden auf einer Seite angezeigt. Das ist mit Sicherheit gewöhnungsbedürftig, hat aber auch Vorteile, weil man zum Beispiel mit der Browsersuche nach bestimmten Wörtern suchen kann. Die üblichen &#8220;Sozialfeatures&#8221; bietet der Shop natürlich auch: Alle Bücher können über Sterne bewertet werden, Kommentare abgegeben werden, Links auf Twitter und Facebook gepostet werden oder einfach nur eine Empfehlung per Mail geschickt werden.</p>
<p>Was ich mir für die Zukunft des Shops noch wünschen würde, wäre eine Wunschliste für Bücher ála Amazon, die es auch ermöglicht Bücher zu verschenken.</p>
<p>Alles, was mir zu meinem papierlosen Glück jetzt noch fehlt ist der passende eBook-Reader. Da warte ich noch gespannt auf die in ungefähr einem Monat auf der Frankfurter Buchmesse stattfindenden Vorstellung des zum txtr-Shop passenden <a href="http://reader.txtr.com/" target="_blank">txtr-Reader</a>. Wer bis dahin nicht warten möchte, sollte sich die <a href="http://wiki.mobileread.com/wiki/E-book_Reader_Matrix" target="_blank">E-book Reader Matrix</a> einmal anschauen &#8211; vielleicht ist da ja das passende Gerät dabei.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thatswinnie.com/2009-09-17/digitale-bucher-fur-deutschland-txtr-ebook-shop/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>iCalBirthdays: Automator-Action</title>
		<link>http://www.thatswinnie.com/2009-09-14/icalbirthdays-automator-action-v7/</link>
		<comments>http://www.thatswinnie.com/2009-09-14/icalbirthdays-automator-action-v7/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 08:50:37 +0000</pubDate>
		<dc:creator>Winnie</dc:creator>
				<category><![CDATA[Automator-Actions]]></category>
		<category><![CDATA[Referenzen]]></category>
		<category><![CDATA[iCalBirthdays]]></category>
		<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[Automator-Action]]></category>

		<guid isPermaLink="false">http://www.thatswinnie.com/2007-10-22/icalbirthdays-automator-action/</guid>
		<description><![CDATA[
Das Betriebssystem Mac OS X bietet viele hilfreiche F [...]]]></description>
			<content:encoded><![CDATA[<p>
Das Betriebssystem Mac OS X bietet viele hilfreiche Features, aber eins fehlt auf jeden Fall: eine automatische Erstellung eines Geburtstagskalenders auf der Basis des Adressbuchs <strong>mit Erinnerung</strong>. Ich schaue nicht jeden Tag in meinen Terminkalender und verpasse so regelmäßig die Geburtstage meiner Freunde und Verwandten. Das hat mich so geärgert, daß ich mir mit AppleScript eine Automator-Action geschrieben habe, die genau das macht &#8211; einen Geburtstagskalender mit Erinnerung erstellen. </p>
<p><img src="http://www.thatswinnie.com/img/icalbirthdays_screenshot_1_7_de.jpg" alt="Screenshot der Automator-Action iCalBirthdays 1.7" /></p>
<p>Die Bedienung ist denkbar einfach: Du öffnest das Programm Automator und wählst in der Kategorie &#8220;iCal&#8221; (Tiger) bzw. &#8220;Kalender&#8221; (Leopard) die Action &#8220;iCalBirthdays&#8221; aus. Dann gibst du den Kalendernamen und die Uhrzeit für den Alarm ein und startest den Automator. That&#8217;s it. <br />
Wenn du noch genauer einstellen willst, wie die Ereignisse angezeigt werden, kannst du die Alarmzeit und die Erinnerung verändern. Die Erinnerung hilft zum Beispiel, nicht zu vergessen, Geburtstagsgeschenke zu kaufen, da die Erinnerung vor dem Geburtstag liegt.<br />
Das Anzeigeformat kannst du nach deinen persönlichen Wünschen einstellen. Dazu kannst du folgende Platzhalter verwenden: </p>
<ul>
<li>%lastname% &#8211; Nachname des Geburtstagskindes</li>
<li>%firstname% &#8211; Vorname des Geburtstagskindes</li>
<li>%yearofbirth% &#8211; Geburtsjahr des Geburtstagskindes</li>
<li>%age% &#8211; Alter des Geburtstagskindes</li>
<li>%birthday% &#8211; Geburtstag des Geburtstagskindes</li>
</ul>
<p>Das Alter ist natürlich nur ein Jahr lang richtig, danach muss die Automator-Action wieder ausgeführt werden.</p>
<p>Hier gibts die Automator-Action zum herunterladen: <a href="http://code.google.com/p/icalbirthdays/" target="_blank">http://code.google.com/p/icalbirthdays/</a></p>
<p><a href="http://www.thatswinnie.com/donate-spenden/"><img src="https://www.paypal.com/de_DE/i/btn/x-click-but04.gif" /></a>
</p>
<p><span id="more-32"></span></p>
<p>
<strong>Changelog:</strong><br />
<em>1.7.1</em></p>
<ul>
<li>Problem unter Snow Leopard behoben (issue 20)</li>
</ul>
<p></p>
<p><em>1.7</em></p>
<ul>
<li>Problem mit 12 AM behoben (issue 5)</li>
<li>Probleme mit einigen Zeitzonen behoben</li>
<li>Erinnerungen am Tag des Ausführens von iCalBirthdays</li>
<li>Titel und zweite Vornamen aus Namen entfernt</li>
</ul>
<p></p>
<p><em>1.6</em><br />
<img src="http://www.thatswinnie.com/img/icalbirthdays_screenshot_1_6_de.jpg" alt="Screenshot der Automator-Action iCalBirthdays 1.6" /></p>
<ul>
<li>optionaler Export</li>
<li>neuer Ereignis-Typ: ganztägiges Ereignis oder Ereignis zur Alarmzeit</li>
<li>optionaler Erinnerungssound</li>
<li>mehr Anzeigeformate für das Ereignis</li>
<li>Text für das Ereignis benutzerdefinierbar</li>
<li>alternativer Text für Erinnerung hinzugefügt</li>
<li>Kuchen-Icon für die Automator-Action</li>
</ul>
<p></p>
<p><em>1.5</em><br />
<img src="http://www.thatswinnie.com/img/icalbirthdays_screenshot_1_5_de.jpg" alt="Screenshot der Automator-Action iCalBirthdays 1.5" /></p>
<ul>
<li>Benutzerdefinierbares Format der Kalendereinträge hinzugefügt</li>
<li>Anzeige des Alters im Geburtstag-Event entfernt bzw. durch Geburtsjahr ersetzt</li>
</ul>
<p></p>
<p><em>1.4</em><br />
<img src="http://www.thatswinnie.com/img/icalbirthdays_screenshot_1_4.jpg" alt="Screenshot der Automator-Action iCalBirthdays 1.4" /></p>
<ul>
<li>Lokalisierung für Deutsch hinzugefügt</li>
<li>Anzeige des Alters im Geburtstag-Event hinzugefügt</li>
</ul>
<p></p>
<p><em>1.3</em><br />
<img src="http://www.thatswinnie.com/img/icalbirthdays_screenshot_1_3.jpg" alt="Screenshot der Automator-Action iCalBirthdays 1.3" /></p>
<ul>
<li>Änderungen am Export des Kalenders für Leopard</li>
<li>Additional Alert wird als Alarm zum Geburtstag-Event hinzugefügt (anstatt einen eigenen Event zu erstellen)</li>
<li>Option zur Auswahl des Alarm hinzugefügt</li>
</ul>
<p></p>
<p><em>1.2</em></p>
<ul>
<li>Fehler in Tiger behoben</li>
</ul>
<p></p>
<p><em>1.1</em><br />
<img src="http://www.thatswinnie.com/img/icalbirthdays_screenshot_1_1.jpg" alt="Screenshot der Automator-Action iCalBirthdays 1.1" /></p>
<ul>
<li>Leopoard ready</li>
<li>Option für zusätzlichen Alarm (Additional Alert) hinzugefügt</li>
</ul>
<p></p>
<p><em>1.0</em><br />
<img src="http://www.thatswinnie.com/img/icalbirthdays_screenshot.jpg" alt="Screenshot der Automator-Action iCalBirthdays 1.0" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thatswinnie.com/2009-09-14/icalbirthdays-automator-action-v7/feed/</wfw:commentRss>
		<slash:comments>90</slash:comments>
		</item>
		<item>
		<title>Googlemail-Backup mit IMAP</title>
		<link>http://www.thatswinnie.com/2008-10-05/googlemail-backup-mit-imap/</link>
		<comments>http://www.thatswinnie.com/2008-10-05/googlemail-backup-mit-imap/#comments</comments>
		<pubDate>Sat, 04 Oct 2008 23:37:41 +0000</pubDate>
		<dc:creator>Winnie</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[E-Mail]]></category>
		<category><![CDATA[Googlemail]]></category>
		<category><![CDATA[IMAP]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Terminal]]></category>

		<guid isPermaLink="false">http://www.thatswinnie.com/?p=41</guid>
		<description><![CDATA[Wie schon erwähnt, bin ich auf der Suche nach der perf [...]]]></description>
			<content:encoded><![CDATA[<p>Wie <a href="http://www.thatswinnie.com/2008-09-28/googlemail-backup/">schon erwähnt</a>, bin ich auf der Suche nach der perfekten Lösung, meine Googlemail-E-Mails zu sichern. Und ich denke ich habe sie gefunden: ein Ruby-Script, das die Synchronisation zwischen meinem Googlemail-Account und einem zweiten IMAP-Account übernimmt. Synchronisation ist dabei vielleicht das falsche Wort, es ist eher ein Backup, was den zweiten IMAP-Account auf dem gleichen Stand wie den Googlemail-Account hält.<br />
Die Basis für das Script kommt von <a href="http://wonko.com/post/ruby_script_to_sync_email_from_any_imap_server_to_gmail" target="_new">Ryan Grove</a>. Ich habe das Löschen von Nachrichten und die Ordner-Auflistung hinzugefügt.<br />
<span id="more-41"></span></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#008000; font-style:italic;">#!/usr/bin/env ruby</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'net/imap'</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># Source server connection info.</span>
SOURCE_HOST = <span style="color:#996600;">'imap.googlemail.com'</span>
SOURCE_PORT = <span style="color:#006666;">993</span>
SOURCE_SSL  = <span style="color:#0000FF; font-weight:bold;">true</span>
SOURCE_USER = <span style="color:#996600;">'EMAIL@googlemail.com'</span>
SOURCE_PASS = <span style="color:#996600;">'PASSWORT'</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># Destination server connection info.</span>
DEST_HOST = <span style="color:#996600;">'imap.SERVER.com'</span>
DEST_PORT = <span style="color:#006666;">143</span>
DEST_SSL  = <span style="color:#0000FF; font-weight:bold;">false</span>
DEST_USER = <span style="color:#996600;">'USER'</span>
DEST_PASS = <span style="color:#996600;">'PASSWORT'</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># List of all Folder that should not be synced</span>
FOLDERS_EXCLUDE = <span style="color:#006600; font-weight:bold;">&#91;</span>
  <span style="color:#996600;">'[Google Mail]'</span>,
  <span style="color:#996600;">'[Google Mail]/Sent Mail'</span>, 
  <span style="color:#996600;">'[Google Mail]/Spam'</span>,
  <span style="color:#996600;">'[Google Mail]/Trash'</span>
<span style="color:#006600; font-weight:bold;">&#93;</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># Utility methods.</span>
<span style="color:#9966CC; font-weight:bold;">def</span> dd<span style="color:#006600; font-weight:bold;">&#40;</span>message<span style="color:#006600; font-weight:bold;">&#41;</span>
   <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;[#{DEST_HOST}] #{message}&quot;</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">def</span> ds<span style="color:#006600; font-weight:bold;">&#40;</span>message<span style="color:#006600; font-weight:bold;">&#41;</span>
   <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;[#{SOURCE_HOST}] #{message}&quot;</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># Connect and log into both servers.</span>
ds <span style="color:#996600;">'connecting...'</span>
source = <span style="color:#6666ff; font-weight:bold;">Net::IMAP</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>SOURCE_HOST, SOURCE_PORT, SOURCE_SSL<span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
ds <span style="color:#996600;">'logging in...'</span>
source.<span style="color:#9900CC;">login</span><span style="color:#006600; font-weight:bold;">&#40;</span>SOURCE_USER, SOURCE_PASS<span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
dd <span style="color:#996600;">'connecting...'</span>
dest = <span style="color:#6666ff; font-weight:bold;">Net::IMAP</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>DEST_HOST, DEST_PORT, DEST_SSL<span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
dd <span style="color:#996600;">'logging in...'</span>
dest.<span style="color:#9900CC;">login</span><span style="color:#006600; font-weight:bold;">&#40;</span>DEST_USER, DEST_PASS<span style="color:#006600; font-weight:bold;">&#41;</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># Getting the folders to sync</span>
folders = <span style="color:#CC0066; font-weight:bold;">Array</span>.<span style="color:#9900CC;">new</span>
source.<span style="color:#9900CC;">list</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;&quot;</span>, <span style="color:#996600;">&quot;%&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>mailbox<span style="color:#006600; font-weight:bold;">|</span>
    <span style="color:#9966CC; font-weight:bold;">if</span> FOLDERS_EXCLUDE.<span style="color:#9966CC; font-weight:bold;">include</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>mailbox.<span style="color:#9900CC;">name</span><span style="color:#006600; font-weight:bold;">&#41;</span> == <span style="color:#0000FF; font-weight:bold;">false</span>
        folders <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> mailbox.<span style="color:#9900CC;">name</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
    <span style="color:#9966CC; font-weight:bold;">if</span> mailbox.<span style="color:#9900CC;">attr</span>.<span style="color:#9966CC; font-weight:bold;">include</span>?<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#6666ff; font-weight:bold;">Net::IMAP::NOSELECT</span><span style="color:#006600; font-weight:bold;">&#41;</span>
        source.<span style="color:#9900CC;">list</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;&quot;</span>, <span style="color:#996600;">&quot;#{mailbox.name}/%&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>mailboxChild<span style="color:#006600; font-weight:bold;">|</span>
            <span style="color:#9966CC; font-weight:bold;">if</span> FOLDERS_EXCLUDE.<span style="color:#9966CC; font-weight:bold;">include</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>mailboxChild.<span style="color:#9900CC;">name</span><span style="color:#006600; font-weight:bold;">&#41;</span> == <span style="color:#0000FF; font-weight:bold;">false</span>
                folders <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> mailboxChild.<span style="color:#9900CC;">name</span>
            <span style="color:#9966CC; font-weight:bold;">end</span>
        <span style="color:#9966CC; font-weight:bold;">end</span> 
    <span style="color:#9966CC; font-weight:bold;">end</span> 
<span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#008000; font-style:italic;">#puts folders</span>
&nbsp;
&nbsp;
<span style="color:#008000; font-style:italic;"># Loop through folders and copy messages.</span>
folders.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>foldername<span style="color:#006600; font-weight:bold;">|</span>
  <span style="color:#008000; font-style:italic;"># Open source folder in read-only mode.</span>
  <span style="color:#9966CC; font-weight:bold;">begin</span>
    ds <span style="color:#996600;">&quot;selecting folder '#{foldername}'...&quot;</span>
    source.<span style="color:#9900CC;">examine</span><span style="color:#006600; font-weight:bold;">&#40;</span>foldername<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> e
    ds <span style="color:#996600;">&quot;error: select failed: #{e}&quot;</span>
    <span style="color:#9966CC; font-weight:bold;">next</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># Open (or create) destination folder in read-write mode.</span>
  <span style="color:#9966CC; font-weight:bold;">begin</span>
    dd <span style="color:#996600;">&quot;selecting folder '#{foldername}'...&quot;</span>
    dest.<span style="color:#CC0066; font-weight:bold;">select</span><span style="color:#006600; font-weight:bold;">&#40;</span>foldername<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> e
    <span style="color:#9966CC; font-weight:bold;">begin</span>
      dd <span style="color:#996600;">&quot;folder not found; creating...&quot;</span>
      dest.<span style="color:#9900CC;">create</span><span style="color:#006600; font-weight:bold;">&#40;</span>foldername<span style="color:#006600; font-weight:bold;">&#41;</span>
      dest.<span style="color:#CC0066; font-weight:bold;">select</span><span style="color:#006600; font-weight:bold;">&#40;</span>foldername<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> ee
      dd <span style="color:#996600;">&quot;error: could not create folder: #{e}&quot;</span>
      <span style="color:#9966CC; font-weight:bold;">next</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># Build a lookup hash of all message ids present in the destination folder.</span>
  dest_info = <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
  dd <span style="color:#996600;">'analyzing existing messages...'</span>
  uids = dest.<span style="color:#9900CC;">uid_search</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'ALL'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">if</span> uids.<span style="color:#9900CC;">length</span> <span style="color:#006600; font-weight:bold;">&gt;</span> <span style="color:#006666;">0</span>
    dest.<span style="color:#9900CC;">uid_fetch</span><span style="color:#006600; font-weight:bold;">&#40;</span>uids, <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'ENVELOPE'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>data<span style="color:#006600; font-weight:bold;">|</span>
      dest_info<span style="color:#006600; font-weight:bold;">&#91;</span>data.<span style="color:#9900CC;">attr</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'ENVELOPE'</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">message_id</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF; font-weight:bold;">true</span>      
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># Loop through all messages in the source folder.</span>
  uids = source.<span style="color:#9900CC;">uid_search</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'ALL'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">if</span> uids.<span style="color:#9900CC;">length</span> <span style="color:#006600; font-weight:bold;">&gt;</span> <span style="color:#006666;">0</span>
    source.<span style="color:#9900CC;">uid_fetch</span><span style="color:#006600; font-weight:bold;">&#40;</span>uids, <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'ENVELOPE'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>data<span style="color:#006600; font-weight:bold;">|</span>
      mid = data.<span style="color:#9900CC;">attr</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'ENVELOPE'</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">message_id</span>
&nbsp;
      <span style="color:#008000; font-style:italic;"># If this message is already in the destination folder, skip it.</span>
      <span style="color:#9966CC; font-weight:bold;">next</span> <span style="color:#9966CC; font-weight:bold;">if</span> dest_info<span style="color:#006600; font-weight:bold;">&#91;</span>mid<span style="color:#006600; font-weight:bold;">&#93;</span>
&nbsp;
      <span style="color:#008000; font-style:italic;"># Download the full message body from the source folder.</span>
      ds <span style="color:#996600;">&quot;downloading message #{mid}...&quot;</span>
      msg = source.<span style="color:#9900CC;">uid_fetch</span><span style="color:#006600; font-weight:bold;">&#40;</span>data.<span style="color:#9900CC;">attr</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'UID'</span><span style="color:#006600; font-weight:bold;">&#93;</span>, <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'RFC822'</span>, <span style="color:#996600;">'FLAGS'</span>,
          <span style="color:#996600;">'INTERNALDATE'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">first</span>
&nbsp;
      <span style="color:#008000; font-style:italic;"># Append the message to the destination folder, preserving flags and</span>
      <span style="color:#008000; font-style:italic;"># internal timestamp.</span>
      dd <span style="color:#996600;">&quot;storing message #{mid}...&quot;</span>
      dest.<span style="color:#9900CC;">append</span><span style="color:#006600; font-weight:bold;">&#40;</span>foldername, msg.<span style="color:#9900CC;">attr</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'RFC822'</span><span style="color:#006600; font-weight:bold;">&#93;</span>, msg.<span style="color:#9900CC;">attr</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'FLAGS'</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
          msg.<span style="color:#9900CC;">attr</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'INTERNALDATE'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
&nbsp;
&nbsp;
  <span style="color:#008000; font-style:italic;"># Build a lookup hash of all message ids present in the source folder.</span>
  source_info = <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
  dd <span style="color:#996600;">'analyzing source messages...'</span>
  uids = source.<span style="color:#9900CC;">uid_search</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'ALL'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">if</span> uids.<span style="color:#9900CC;">length</span> <span style="color:#006600; font-weight:bold;">&gt;</span> <span style="color:#006666;">0</span>
    source.<span style="color:#9900CC;">uid_fetch</span><span style="color:#006600; font-weight:bold;">&#40;</span>uids, <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'ENVELOPE'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>data<span style="color:#006600; font-weight:bold;">|</span>
      source_info<span style="color:#006600; font-weight:bold;">&#91;</span>data.<span style="color:#9900CC;">attr</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'ENVELOPE'</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">message_id</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF; font-weight:bold;">true</span>      
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
  <span style="color:#008000; font-style:italic;"># Loop through all messages in the source folder.</span>
  uids = dest.<span style="color:#9900CC;">uid_search</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'ALL'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#9966CC; font-weight:bold;">if</span> uids.<span style="color:#9900CC;">length</span> <span style="color:#006600; font-weight:bold;">&gt;</span> <span style="color:#006666;">0</span>
     dest.<span style="color:#9900CC;">uid_fetch</span><span style="color:#006600; font-weight:bold;">&#40;</span>uids, <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'ENVELOPE'</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>data<span style="color:#006600; font-weight:bold;">|</span>
      mid = data.<span style="color:#9900CC;">attr</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">'ENVELOPE'</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">message_id</span>
&nbsp;
      <span style="color:#008000; font-style:italic;"># If this message is already in the destination folder, skip it.</span>
      <span style="color:#9966CC; font-weight:bold;">next</span> <span style="color:#9966CC; font-weight:bold;">if</span> source_info<span style="color:#006600; font-weight:bold;">&#91;</span>mid<span style="color:#006600; font-weight:bold;">&#93;</span>
&nbsp;
      <span style="color:#008000; font-style:italic;"># Setting flag for deletion</span>
      ds <span style="color:#996600;">&quot;deleting message #{mid}...&quot;</span>
     dest.<span style="color:#9900CC;">store</span><span style="color:#006600; font-weight:bold;">&#40;</span>data.<span style="color:#9900CC;">seqno</span>, <span style="color:#996600;">&quot;+FLAGS&quot;</span>, <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:Deleted</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
&nbsp;
  dest.<span style="color:#9900CC;">expunge</span>
  source.<span style="color:#9900CC;">close</span>
  dest.<span style="color:#9900CC;">close</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
&nbsp;
<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">'done'</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.thatswinnie.com/2008-10-05/googlemail-backup-mit-imap/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Googlemail-Backup</title>
		<link>http://www.thatswinnie.com/2008-09-28/googlemail-backup/</link>
		<comments>http://www.thatswinnie.com/2008-09-28/googlemail-backup/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 18:46:24 +0000</pubDate>
		<dc:creator>Winnie</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Backup]]></category>
		<category><![CDATA[E-Mail]]></category>
		<category><![CDATA[fetchmail]]></category>
		<category><![CDATA[Googlemail]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[Terminal]]></category>

		<guid isPermaLink="false">http://www.thatswinnie.com/?p=40</guid>
		<description><![CDATA[Das Bedürfnis, meine E-Mail vom Googlemail-Server zu s [...]]]></description>
			<content:encoded><![CDATA[<p>Das Bedürfnis, meine E-Mail vom Googlemail-Server zu sichern ist in den letzten Wochen extrem gestiegen. Grund dafür sind immer wieder Schauermärchen von gesperrten Mail-Accounts. Deswegen habe ich mich auf die Suche nach einer Backup-Möglichkeit für meine E-Mails gemacht und bin bei fetchmail fündig geworden. Fetchmail ist auf dem Mac unter Leopard vorinstalliert.<br />
<span id="more-40"></span><br />
Um Mails mit fetchmail empfangen zu können, muss man als erstes ein Zertifikatsverzeichnis einrichten und die nötigen SSL-Zertifikate von Googlemail herunterladen. Dazu gibt man im Terminal folgende Zeilen ein:<br />
<code><br />
mkdir ~/.certs<br />
cd ~/.certs<br />
openssl s_client -connect pop.googlemail.com:995 -showcerts </dev/null<br />
</code></p>
<p>Aus den Ausgaben im Terminal kopiert man sich das Zertifikat, das aus folgenden Zeilen besteht:<br />
<code><br />
-----BEGIN CERTIFICATE-----<br />
(viele Buchstaben)<br />
-----END CERTIFICATE-----<br />
</code></p>
<p>Nun muss das Zertifkat in eine Datei geschrieben werden:<br />
<code><br />
touch googlemailpop.pem<br />
sudo pico googlemailpop.pem<br />
</code></p>
<p>Jetzt kann das Zertifikat hineinkopiert werden. Mit CTRL + X kann man die Datei verlassen und muss das Speichern noch mit Y bestätigen.</p>
<p>Nun werden noch ein Zertifikate von Equifax benötigt. Dazu muss man sich von der <a href="http://www.geotrust.com/resources/root_certificates/index.asp" target="_new">Equifax-Seite</a> das “Equifax Secure Certificate Authority (Base-64 encoded X.509)” herunterladen, nach "equifax.pem" umbenenennen und in den Zertifikatsordner kopieren. </p>
<p>Fehlt nur noch das Hashen der Zertifkate:<br />
<code><br />
c_rehash .<br />
</code></p>
<p>Um das eigentlich Abholen seiner E-Mails einzurichten, muss die Konfigurations-Datei von fetchmail eingerichtet und bearbeitet werden:<br />
<code><br />
touch ~/.fetchmailrc<br />
chmod 710 ~/.fetchmailrc<br />
sudo pico ~/.fetchmailrc<br />
</code></p>
<p>Hier muss der folgende Text eingefügt werden - der natürlich vorher um die eigenen Zugangsdaten ergänzt werden muss:<br />
<code><br />
poll pop.googlemail.com with proto POP3 and options no dns<br />
user 'GOOGLEMAIL_USERNAME@googlemail.com' there with password 'GOOGLEMAIL_PASSWORD' is 'LOCAL_USERNAME' here and wants mda "/usr/bin/procmail -d %T"  options ssl keep sslcertck sslcertpath "/Users/LOCAL_USERNAME/.certs"<br />
</code><br />
Und auch gilt wieder: Mit CTRL + X kann man die Datei verlassen und muss das Speichern mit Y bestätigen.</p>
<p>Letzter Schritt: Mails abrufen<br />
<code><br />
fetchmail -v --fetchall --invisible<br />
</code></p>
<p>Die E-Mails werden in der Datei /var/mail/LOCAL_USERNAME abgelegt. Falls das Abrufen der E-Mails nicht klappt, sollte man in seinem Googlemail-Account überprüfen, ob das Abrufen per POP eingestellt ist (Einstellungen / Weiterleitung und POP/IMAP / POP für alle Nachrichten (auch bereits heruntergeladene) aktivieren).</p>
<p>Als ein Zusatzfeature zu Schluss sollte man sich noch einen automatisierten Job einrichten, der die E-Mails einmal am Tag abruft, damit man das nicht manuell über das Terminal machen muss. Dazu empfehle ich, den Artikel "<a href="http://developer.apple.com/macosx/launchd.html">Getting Started with launchd</a>" bei Apple durchzulesen.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thatswinnie.com/2008-09-28/googlemail-backup/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Der Feed für die Gemeinde</title>
		<link>http://www.thatswinnie.com/2008-07-13/der-feed-fur-die-gemeinde-07-2008/</link>
		<comments>http://www.thatswinnie.com/2008-07-13/der-feed-fur-die-gemeinde-07-2008/#comments</comments>
		<pubDate>Sun, 13 Jul 2008 17:45:17 +0000</pubDate>
		<dc:creator>Winnie</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[SimplePie]]></category>

		<guid isPermaLink="false">http://www.thatswinnie.com/2007-12-02/der-feed-fur-die-gemeinde/</guid>
		<description><![CDATA[Das alte Studio steht nicht mehr, Kathrin Bauerfeind is [...]]]></description>
			<content:encoded><![CDATA[<p>Das alte Studio steht nicht mehr, Kathrin Bauerfeind ist schon lange zur Old-Media-Konkurrenz gewechselt. Und mein alter Feed läuft nach dem Relaunch der Website auch nicht mehr &#8211; die Dateien gibt es jetzt nur noch gezippt.</p>
<p>Deswegen gibt es hier ein Update, das zumindest den Mac-Usern etwas weiterhilft. Zumindest unter Leopard. Alle anderen können das Skript mit mehr oder weniger Aufwand ans eigene System anpassen.</p>
<p><span id="more-34"></span></p>
<ol>
<li>
        Lokalen Webserver mit PHP aktivieren</p>
<ul>
<li>Terminal öffnen</li>
<li>
<pre>sudo pico /etc/apache2/httpd.conf</pre>
<p> um die Config-Datei des lokalen Webservers zu bearbeiten. Dafür wird noch ein Admin-Passwort abgefragt.</li>
<li>mit Ctrl + W nach &#8216;php&#8217; suchen</li>
<li>das Kommentarzeichen ’#&#8217; am Anfang der Zeile entfernen</li>
<li>mit Ctrl + X, und dann mit Y und dann Enter speichern</li>
<li>in den Systemeinstellungen unter &#8216;Sharing&#8217; den Punkt &#8216;Web-Sharing&#8217; aktivieren</li>
<li>die lokale Adresse (z.B. http://192.168.1.1/~username/) merken</li>
</ul>
</li>
<li>Das Podcastskript (<a href="#TB_inline?height=500&amp;width=750&amp;inlineId=hiddenCodeID34_2" class="thickbox">feed.php</a> herunterladen und in ~/Sites/podcastfeed/feed.php speichern. Der Ordner braucht Schreibrechte für den Webserver-User. In den ersten paar Zeilen müssen noch die richtigen Servernamen und so für deine Lieblings-Internet-Fernsehsendung eingetragen werden.</li>
<li>Zusätzliche Klassen installieren
<ul>
<li><a href="http://simplepie.org/" target="_blank">SimplePie</a> laden und unter ~/Sites/podcastfeed/class/simplepie.class.php speichern</li>
<li><a href="#TB_inline?height=500&amp;width=750&amp;inlineId=hiddenCodeID34_1" class="thickbox">rss_writer.class.php</a> laden und unter ~/Sites/podcastfeed/class/rss_writer.class.php speichern &#8211; die Klasse basiert auf der <a href="http://www.bitfolge.de/rsscreator-en.html" target="_blank">FeedCreator.class.php</a> von Kai Blankenhorn</li>
</ul>
</li>
<li>In dem podcastfeed-Ordner müssen außerdem noch zwei Unterordner cache und files, jeweils mit vollen Schreib- und Leserechten angelegt werden.</li>
<li>Podcast in iTunes abonnieren
<ul>
<li>Unter &#8216;Erweitert | Podcast abonnieren&#8217; die Feed-Adresse vom eigenen Rechner eintragen, z.B. http://192.168.1.1/~username/podcastfeed/feed.php</li>
<li>iTunes wird jetzt beim ersten Aufruf noch keine Folgen finden, sie werden aber im Hintergrund heruntergeladen und auf dem eigenen Rechner ausgepackt.</li>
<li>Beim nächsten Update von iTunes werden die ersten Folgen erscheinen, die schon heruntergeladen sind.</li>
</ul>
</li>
</ol>
<p>Das Skript behält immer die letzten 10 Folgen auf dem System.</p>
<p>Obacht: Das Aktivieren des lokalen Webservers ist evtl. nicht jedermanns Sache, andererseits &#8211; wer bis hierher durchgehalten hat, weiß hoffentlich, was er tut.</p>
<p>Wenns nicht läuft &#8211; Das Apache-Log könnt ihr mit der Konsole in /var/log/apache2/ einsehen.</p>
<p>Ich bin Winnie. Das war mein Podcastskript. Tschü&szlig;.</p>
<div id="hiddenCodeID34_1" style="display:none">
<p>
<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>
    <span style="color: #666666; font-style: italic;">/* E X A M P L E -----------------------------------------------
		$feed = new RSS();
		$feed-&gt;title       = &quot;RSS Feed Title&quot;;
		$feed-&gt;link        = &quot;http://website.com&quot;;
		$feed-&gt;description = &quot;Recent articles on your website.&quot;;
&nbsp;
		$db-&gt;query($query);
		$result = $db-&gt;result;
		while($row = mysql_fetch_array($result, MYSQL_ASSOC))
		{
			$item = new RSSItem();
			$item-&gt;title = $title;
			$item-&gt;link  = $link;
			$item-&gt;setPubDate($create_date); 
			$item-&gt;description = &quot;&lt;![CDATA[ $html ]]&gt;&quot;;
			$feed-&gt;addItem($item);
		}
		echo $feed-&gt;serve();
	---------------------------------------------------------------- */</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">class</span> RSS
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$title</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$link</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$description</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$language</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;en-us&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$pubDate</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$items</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$tags</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$encoding</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;utf-8&quot;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> RSS<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">items</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tags</span>  <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> addItem<span style="color: #009900;">&#40;</span><span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">items</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$item</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> setPubDate<span style="color: #009900;">&#40;</span><span style="color: #000088;">$when</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$when</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span>
				<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">pubDate</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;D, d M Y H:i:s &quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$when</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;GMT&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">else</span>
				<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">pubDate</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;D, d M Y H:i:s &quot;</span><span style="color: #339933;">,</span> <span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$when</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;GMT&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> getPubDate<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
  			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">pubDate</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
				<span style="color: #b1b100;">return</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;D, d M Y H:i:s &quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;GMT&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">else</span>
				<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">pubDate</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> addTag<span style="color: #009900;">&#40;</span><span style="color: #000088;">$tag</span><span style="color: #339933;">,</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tags</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$tag</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$value</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> out<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$out</span>  <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$out</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;channel&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$out</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;title&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/title&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$out</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;link&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/link&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$out</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;description&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">description</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/description&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$out</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;language&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">language</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/language&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$out</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;pubDate&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getPubDate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/pubDate&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tags</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$key</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$val</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$out</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;<span style="color: #006699; font-weight: bold;">$key</span>&gt;<span style="color: #006699; font-weight: bold;">$val</span>&lt;/<span style="color: #006699; font-weight: bold;">$key</span>&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">items</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$out</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$item</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">out</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000088;">$out</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;/channel&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000088;">$out</span> <span style="color: #339933;">.=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">footer</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #000088;">$out</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&amp;&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&amp;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$out</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$out</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> serve<span style="color: #009900;">&#40;</span><span style="color: #000088;">$contentType</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;application/xml&quot;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$xml</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">out</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Content-type: <span style="color: #006699; font-weight: bold;">$contentType</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">echo</span> <span style="color: #000088;">$xml</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$out</span>  <span style="color: #339933;">=</span> <span style="color: #0000ff;">'&lt;'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'?xml version=&quot;1.0&quot; encoding=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">encoding</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;?'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$out</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">'&lt;rss version=&quot;2.0&quot; xmlns:dc=&quot;http://purl.org/dc/elements/1.1/&quot;&gt;'</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$out</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> footer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #0000ff;">'&lt;/rss&gt;'</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">class</span> RSSItem
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$title</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$link</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$description</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$pubDate</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$guid</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$tags</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$attachment</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$length</span><span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$mimetype</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> RSSItem<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span> 
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tags</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> setPubDate<span style="color: #009900;">&#40;</span><span style="color: #000088;">$when</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$when</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span>
				<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">pubDate</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;D, d M Y H:i:s &quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$when</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;GMT&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">else</span>
				<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">pubDate</span> <span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;D, d M Y H:i:s &quot;</span><span style="color: #339933;">,</span> <span style="color: #990000;">strtotime</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$when</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;GMT&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> getPubDate<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">pubDate</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
				<span style="color: #b1b100;">return</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;D, d M Y H:i:s &quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;GMT&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">else</span>
				<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">pubDate</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> addTag<span style="color: #009900;">&#40;</span><span style="color: #000088;">$tag</span><span style="color: #339933;">,</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tags</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$tag</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$value</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> out<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$out</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;item&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$out</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;title&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/title&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$out</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;link&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/link&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$out</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;description&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">description</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/description&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$out</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;pubDate&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getPubDate</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/pubDate&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">attachment</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span>
				<span style="color: #000088;">$out</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;enclosure url='<span style="color: #006699; font-weight: bold;">{$this-&gt;attachment}</span>' length='<span style="color: #006699; font-weight: bold;">{$this-&gt;length}</span>' type='<span style="color: #006699; font-weight: bold;">{$this-&gt;mimetype}</span>' /&gt;&quot;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">guid</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">guid</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$out</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;guid&gt;&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">guid</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;&lt;/guid&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
			<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">tags</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$key</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$val</span><span style="color: #009900;">&#41;</span> <span style="color: #000088;">$out</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;<span style="color: #006699; font-weight: bold;">$key</span>&gt;<span style="color: #006699; font-weight: bold;">$val</span>&lt;/<span style="color: #006699; font-weight: bold;">$key</span><span style="color: #000099; font-weight: bold;">\n</span>&gt;&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$out</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;&lt;/item&gt;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #000088;">$out</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #000000; font-weight: bold;">function</span> enclosure<span style="color: #009900;">&#40;</span><span style="color: #000088;">$url</span><span style="color: #339933;">,</span> <span style="color: #000088;">$mimetype</span><span style="color: #339933;">,</span> <span style="color: #000088;">$length</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">attachment</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$url</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">mimetype</span>   <span style="color: #339933;">=</span> <span style="color: #000088;">$mimetype</span><span style="color: #339933;">;</span>
			<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">length</span>     <span style="color: #339933;">=</span> <span style="color: #000088;">$length</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

</p>
</div>
<div id="hiddenCodeID34_2" style="display:none">
<p>
<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class/simplepie.class.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'class/rss_writer.class.php'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;BLOG_RSS_URL&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;http://www.PODCASTURL.de/rss.xml&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;BLOG_VIDEO_URL&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;http://PODCAST.SERVER-X.VIDEO.DOMAIN.de/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;BLOG_VIDEO_DOWNLOAD_EXTENSION&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;.mov.zip&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;BLOG_VIDEO_TYPE&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;video/quicktime&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;VIDEO_URL&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;files/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;VIDEO_EXTENSION&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;.mov&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;ABSOLUTE_PATH&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;/Users/username/Sites/podcastfeed/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;WEB_PATH&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;http://192.168.1.1/~username/podcastfeed/&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Parse it</span>
<span style="color: #000088;">$feed</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> SimplePie<span style="color: #009900;">&#40;</span>BLOG_RSS_URL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// neue Dateien laden</span>
getFilesFromFeed<span style="color: #009900;">&#40;</span><span style="color: #000088;">$feed</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Feed erstellen</span>
showRssFromSystemFiles<span style="color: #009900;">&#40;</span><span style="color: #000088;">$feed</span><span style="color: #339933;">,</span> VIDEO_URL<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;">// liefert den RSS-Feed mit Enclosures von den geladenen Dateien</span>
<span style="color: #000000; font-weight: bold;">function</span> showRssFromSystemFiles<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$uFeed</span><span style="color: #339933;">,</span> <span style="color: #000088;">$uFolder</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$locFiles</span> <span style="color: #339933;">=</span> getFileListFromSystem<span style="color: #009900;">&#40;</span><span style="color: #000088;">$uFolder</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-type: text/xml'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$rss</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> RSS<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">encoding</span>    <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$uFeed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_encoding</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>?<span style="color: #000088;">$uFeed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_encoding</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span><span style="color: #0000ff;">'UTF-8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span>       <span style="color: #339933;">=</span> <span style="color: #000088;">$uFeed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_title</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span>        <span style="color: #339933;">=</span> <span style="color: #000088;">$uFeed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_permalink</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">description</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$uFeed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_description</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">language</span>    <span style="color: #339933;">=</span> <span style="color: #000088;">$uFeed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_language</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$uFeed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$items</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$uFeed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_items</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$items</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$thisItem</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$rssItem</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> RSSItem<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$locEnclosureLink</span> <span style="color: #339933;">=</span> getEnclosureLink<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thisItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_categories</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
            <span style="color: #666666; font-style: italic;">// Datei aus Feed in System vorhanden, dann in Feed aufnehmen</span>
            <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">in_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$locEnclosureLink</span><span style="color: #339933;">.</span>VIDEO_EXTENSION<span style="color: #339933;">,</span> <span style="color: #000088;">$locFiles</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#123;</span>
                <span style="color: #000088;">$rssItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$thisItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_title</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$rssItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span>  <span style="color: #339933;">=</span> <span style="color: #000088;">$thisItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_link</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #000088;">$rssItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setPubDate</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$thisItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_date</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
                <span style="color: #000088;">$rssItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">description</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;![CDATA[ &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$thisItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_description</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; ]]&gt;&quot;</span><span style="color: #339933;">;</span>
                <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">is_null</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$locEnclosureLink</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
                    <span style="color: #000088;">$rssItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">enclosure</span><span style="color: #009900;">&#40;</span>WEB_PATH<span style="color: #339933;">.</span><span style="color: #000088;">$uFolder</span><span style="color: #339933;">.</span><span style="color: #000088;">$locEnclosureLink</span><span style="color: #339933;">.</span>VIDEO_EXTENSION<span style="color: #339933;">,</span> BLOG_VIDEO_TYPE<span style="color: #339933;">,</span> <span style="color: #cc66cc;">12</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
                <span style="color: #009900;">&#125;</span>
                <span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addItem</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$rssItem</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>   
            <span style="color: #009900;">&#125;</span>          
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">serve</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// liefert den Original-RSS-Feed mit Enclosures </span>
<span style="color: #000000; font-weight: bold;">function</span> showRssFromOrginalFeed<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$uFeed</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
    <span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-type: text/xml'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$rss</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> RSS<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">encoding</span>    <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$uFeed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_encoding</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>?<span style="color: #000088;">$uFeed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_encoding</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span><span style="color: #0000ff;">'UTF-8'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span>       <span style="color: #339933;">=</span> <span style="color: #000088;">$uFeed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_title</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span>        <span style="color: #339933;">=</span> <span style="color: #000088;">$uFeed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_permalink</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">description</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$uFeed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_description</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">language</span>    <span style="color: #339933;">=</span> <span style="color: #000088;">$uFeed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_language</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$uFeed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$items</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$uFeed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_items</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$items</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$thisItem</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #000088;">$rssItem</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> RSSItem<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$rssItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">title</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$thisItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_title</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$rssItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">link</span>  <span style="color: #339933;">=</span> <span style="color: #000088;">$thisItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_link</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #000088;">$rssItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setPubDate</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$thisItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_date</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
            <span style="color: #000088;">$rssItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">description</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;&lt;![CDATA[ &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$thisItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_description</span><span style="color: #009900;">&#40;</span><span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; ]]&gt;&quot;</span><span style="color: #339933;">;</span>
            <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">is_null</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$locEnclosureLink</span> <span style="color: #339933;">=</span> getEnclosureLink<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thisItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_categories</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
                <span style="color: #000088;">$rssItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">enclosure</span><span style="color: #009900;">&#40;</span>BLOG_VIDEO_URL<span style="color: #339933;">.</span><span style="color: #000088;">$locEnclosureLink</span><span style="color: #339933;">.</span>BLOG_VIDEO_DOWNLOAD_EXTENSION<span style="color: #339933;">,</span> BLOG_VIDEO_TYPE<span style="color: #339933;">,</span> <span style="color: #cc66cc;">12</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
            <span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addItem</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$rssItem</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>             
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$rss</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">serve</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// liefert den Enclosure-Link zurück</span>
<span style="color: #000000; font-weight: bold;">function</span> getEnclosureLink<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$uEnclosure</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$locEnclosureLink</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$locEnclosure</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$uEnclosure</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$locEnclosure</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">is_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$locEnclosure</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #b1b100;">for</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$i</span><span style="color: #339933;">=</span><span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span> <span style="color: #339933;">&lt;</span> <span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$locEnclosure</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #000088;">$i</span><span style="color: #339933;">++</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                <span style="color: #666666; font-style: italic;">//echo $i;</span>
                <span style="color: #000088;">$locItem</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$locEnclosure</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$i</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
                <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">is_object</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$locItem</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$locItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">term</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                        <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$locItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">term</span><span style="color: #339933;">,</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Y&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">!==</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                            <span style="color: #000088;">$locEnclosureLink</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$locItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">term</span><span style="color: #339933;">;</span>
                        <span style="color: #009900;">&#125;</span>
                    <span style="color: #009900;">&#125;</span>
                <span style="color: #009900;">&#125;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$locEnclosureLink</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;">// läd die Dateien aus dem Feed, die noch nicht im System liegen</span>
<span style="color: #666666; font-style: italic;">// bzw. wenn Datei nicht im Feed aber im System dann löschen</span>
<span style="color: #000000; font-weight: bold;">function</span> getFilesFromFeed<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$uFeed</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$locFilesInSystem</span> <span style="color: #339933;">=</span> getFileListFromSystem<span style="color: #009900;">&#40;</span>VIDEO_URL<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">,</span> VIDEO_EXTENSION<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$locFilesInFeed</span> <span style="color: #339933;">=</span> getFileListFromFeed<span style="color: #009900;">&#40;</span><span style="color: #000088;">$uFeed</span><span style="color: #339933;">,</span> BLOG_VIDEO_DOWNLOAD_EXTENSION<span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// welche Dateien sind im System aber nicht im Feed</span>
    <span style="color: #000088;">$locDiffSystemToFeed</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_diff</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$locFilesInSystem</span><span style="color: #339933;">,</span> <span style="color: #000088;">$locFilesInFeed</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// welche Dateien sind im Feed aber nicht im System</span>
    <span style="color: #000088;">$locDiffFeedToSystem</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array_diff</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$locFilesInFeed</span><span style="color: #339933;">,</span> <span style="color: #000088;">$locFilesInSystem</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Datei, die nicht im Feed sind vom System löschen</span>
    <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$locDiffSystemToFeed</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #339933;">@</span><span style="color: #990000;">unlink</span><span style="color: #009900;">&#40;</span>VIDEO_URL<span style="color: #339933;">.</span><span style="color: #000088;">$item</span><span style="color: #339933;">.</span>VIDEO_EXTENSION<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000088;">$locExec</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;#!/bin/bash<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Datei, die nicht im System sind aus Feed holen</span>
    <span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$locDiffFeedToSystem</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$item</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$submit_url</span> <span style="color: #339933;">=</span> BLOG_VIDEO_URL<span style="color: #339933;">.</span><span style="color: #000088;">$item</span><span style="color: #339933;">.</span>BLOG_VIDEO_DOWNLOAD_EXTENSION<span style="color: #339933;">;</span>	
        <span style="color: #000088;">$save_path</span> <span style="color: #339933;">=</span> VIDEO_URL<span style="color: #339933;">.</span><span style="color: #000088;">$item</span><span style="color: #339933;">.</span>BLOG_VIDEO_DOWNLOAD_EXTENSION<span style="color: #339933;">;</span>	
&nbsp;
        <span style="color: #000088;">$locExec</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;/usr/bin/curl &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$submit_url</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; -o &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$save_path</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; -L<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Datei laden</span>
        <span style="color: #000088;">$locExec</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;/usr/bin/unzip &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$save_path</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; *&quot;</span><span style="color: #339933;">.</span>VIDEO_EXTENSION<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; -d &quot;</span><span style="color: #339933;">.</span>VIDEO_URL<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Datei entzippen</span>
        <span style="color: #000088;">$locExec</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;rm &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$save_path</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// Zip löschen</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// in eine Datei schreiben und Datei als Script ausführen</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">count</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$locDiffFeedToSystem</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&gt;</span> <span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$handle</span> <span style="color: #339933;">=</span> <span style="color: #990000;">fopen</span> <span style="color: #009900;">&#40;</span>ABSOLUTE_PATH<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;loadFeedFiles.sh&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;w&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">fputs</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span><span style="color: #339933;">,</span> <span style="color: #000088;">$locExec</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #990000;">fclose</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$handle</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #339933;">@</span><span style="color: #990000;">chmod</span> <span style="color: #009900;">&#40;</span>ABSOLUTE_PATH<span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;loadFeedFiles.sh&quot;</span><span style="color: #339933;">,</span> <span style="color: #208080;">0777</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
        <span style="color: #666666; font-style: italic;">// Script ausführen</span>
        <span style="color: #990000;">exec</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;./loadFeedFiles.sh &gt; /dev/null &amp;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// gibt alle Dateien aus dem Feed als Array zurück</span>
<span style="color: #000000; font-weight: bold;">function</span> getFileListFromFeed<span style="color: #009900;">&#40;</span><span style="color: #339933;">&amp;</span><span style="color: #000088;">$uFeed</span><span style="color: #339933;">,</span> <span style="color: #000088;">$uExtension</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$uBasename</span><span style="color: #339933;">=</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$files</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$uFeed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">data</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #000088;">$items</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$uFeed</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_items</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$items</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$thisItem</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
            <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">is_null</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$locEnclosureLink</span> <span style="color: #339933;">=</span> getEnclosureLink<span style="color: #009900;">&#40;</span><span style="color: #000088;">$thisItem</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">get_categories</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 
                <span style="color: #000088;">$files</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$locEnclosureLink</span><span style="color: #339933;">.</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$uBasename</span><span style="color: #009900;">&#41;</span>?<span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">:</span><span style="color: #000088;">$uExtension</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>   
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$files</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// gibt alle Dateien aus dem Ordner als Array zurück</span>
<span style="color: #000000; font-weight: bold;">function</span> getFileListFromSystem<span style="color: #009900;">&#40;</span><span style="color: #000088;">$uFolder</span><span style="color: #339933;">,</span> <span style="color: #000088;">$uBasename</span><span style="color: #339933;">=</span><span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span> <span style="color: #000088;">$uExtension</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$files</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span> <span style="color: #339933;">=</span> <span style="color: #990000;">opendir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$uFolder</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
        <span style="color: #b1b100;">while</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span> <span style="color: #339933;">=</span> <span style="color: #990000;">readdir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
        <span style="color: #009900;">&#123;</span>
            <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">is_dir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$file</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;.&quot;</span> <span style="color: #339933;">&amp;&amp;</span> <span style="color: #000088;">$file</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;..&quot;</span> <span style="color: #339933;">&amp;&amp;</span>  <span style="color: #000088;">$file</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;.DS_Store&quot;</span> <span style="color: #339933;">&amp;</span> <span style="color: #000088;">$file</span> <span style="color: #339933;">!=</span> <span style="color: #0000ff;">&quot;__MACOSX&quot;</span><span style="color: #009900;">&#41;</span>
            <span style="color: #009900;">&#123;</span>
                <span style="color: #000088;">$files</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$uBasename</span><span style="color: #009900;">&#41;</span>?<span style="color: #990000;">basename</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$file</span><span style="color: #339933;">,</span> <span style="color: #000088;">$uExtension</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">:</span><span style="color: #000088;">$file</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        <span style="color: #990000;">closedir</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$dir</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$files</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.thatswinnie.com/2008-07-13/der-feed-fur-die-gemeinde-07-2008/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>AppleScript für iTunes: Selection 2 Playlist</title>
		<link>http://www.thatswinnie.com/2008-03-24/applescript-fur-itunes-selection-2-playlist/</link>
		<comments>http://www.thatswinnie.com/2008-03-24/applescript-fur-itunes-selection-2-playlist/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 00:08:30 +0000</pubDate>
		<dc:creator>Winnie</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[AppleScript]]></category>
		<category><![CDATA[iTunes]]></category>
		<category><![CDATA[Playlist]]></category>

		<guid isPermaLink="false">http://www.thatswinnie.com/2008-03-24/applescript-fur-itunes-selection-2-playlist/</guid>
		<description><![CDATA[
Kennst du diese praktische Funktion in iPhoto? Fotos  [...]]]></description>
			<content:encoded><![CDATA[<p>
Kennst du diese praktische Funktion in iPhoto? Fotos markieren, neues Album aus Auswahl erstellen? Großartig. Leider hat Apple die Funktion in iTunes vergessen.</p>
<p><a href="http://www.thatswinnie.com/download/iTunes_selection2playlist.zip" target="_blank">Dieses AppleScript</a> nimmt die markierten Songs, macht einen meist sinnvollen Namensvorschlag, den du auch noch ändern kannst, und packt sie in eine Wiedergabeliste.</p>
<p>Um das Skript zu installieren, legst du es einfach entpackt in ~/Library/iTunes/Scripts ab. Wenn dieser Ordner noch nicht existiert, leg ihn an. Wenn alles geklappt hat, erscheint neben dem &#8220;Fenster&#8221;-Menü in iTunes ein neues Skript-Menü mit dem Link &#8220;iTunes &#8211; selection 2 playlist&#8221;.</p>
<p><a href="http://www.thatswinnie.com/download/iTunes_selection2playlist.zip" target="_blank"><br />
Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.thatswinnie.com/2008-03-24/applescript-fur-itunes-selection-2-playlist/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Podcast-Feed</title>
		<link>http://www.thatswinnie.com/2007-09-10/postcast-feed/</link>
		<comments>http://www.thatswinnie.com/2007-09-10/postcast-feed/#comments</comments>
		<pubDate>Mon, 10 Sep 2007 08:31:21 +0000</pubDate>
		<dc:creator>Winnie</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[Snoopy]]></category>

		<guid isPermaLink="false">http://localhost:8888/thatswinnie/?p=6</guid>
		<description><![CDATA[Auch wenn Kathrin Bauerfeind diesen nicht näher genann [...]]]></description>
			<content:encoded><![CDATA[<p>Auch wenn Kathrin Bauerfeind diesen nicht näher genannten Podcast nicht mehr moderiert, so ist er trotzdem einer meiner Lieblingspodcasts. Nur nervt es, sich das Video immer auf der Webseite anschauen zu müssen, weil es keinen Podcastfeed gibt. Aber da kann geholfen werden: ich hab mir einen eigenen Feed mit PHP programmiert und kann nun den Podcast bequem in iTunes laden und anschauen.</p>
<p><span id="more-6"></span><br />
So geht&#8217;s:<br />
Zum einen brauchst du die PHP-Klasse <a href="http://sourceforge.net/projects/snoopy/" target="_blank">Snoopy</a>. Die kopierst du auf deinen Webspace in den Ordner &#8220;class&#8221;. Eine weitere Klasse kommt noch hinzu: <a href="#TB_inline?height=500&amp;width=750&amp;inlineId=hiddenCodeID31_1" class="thickbox">xml2obj</a>. Markiere den Quelltext, kopiere sie in einen Texteditor, speichere sie unter dem Dateinamen &#8220;xml2obj.class.php&#8221; und spiele sie ebenfalls in den Ordner &#8220;class&#8221; auf deinem Webspace.</p>
<p>Das eigentliche Erstellen des Feeds mit Enclosures für die Videodateien findest du hier:<br />
<a href="#TB_inline?height=500&amp;width=750&amp;inlineId=hiddenCodeID31_2" class="thickbox">feed.php</a>. Kopiere dir wieder den Quelltext und spiele ihn in ein neues Dokument in deinen Texteditor. Nun mußt du die URLs &#8220;BLOG_RSS_URL&#8221; (Zeile 7) und &#8220;BLOG_VIDEO_URL&#8221; (Zeile 8) von der Podcastwebseite heraussuchen und eintragen. Der Internetauftritt des Podcasts bietet einen normalen Feed an &#8211; seine Adresse mußt du bei &#8220;BLOG_RSS_URL&#8221; eintragen. Die &#8220;BLOG_VIDEO_URL&#8221; ist die URL zu einem Video sein, aber ohnen den Dateinamen des Films. Damit die Videos auch auf den iPod gesynct werden können, solltest du die Adresse zum Quicktime-Video nehmen. Dann mußt du die Datei unter dem Dateinamen &#8220;feed.php&#8221; speichern und in den Root-Ordner deines Webspaces spielen. Dann nur noch die &#8220;feed.php&#8221; im iTunes abonnieren (Advanced -> Subscribe to Podcast) und that&#8217;s it.</p>
<div id="hiddenCodeID31_1" style="display:none">
<p>
<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>
<span style="color: #666666; font-style: italic;">// wandelt ein XML-String in ein Objekt mit entsprechender Verschachtelungs-Tiefe</span>
<span style="color: #666666; font-style: italic;">// Quelle: user-contribution von php.net (leicht modifiziert)</span>
<span style="color: #000000; font-weight: bold;">class</span> xml2obj
<span style="color: #009900;">&#123;</span>
   <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #000088;">$path</span><span style="color: #339933;">;</span>
&nbsp;
   <span style="color: #000000; font-weight: bold;">function</span> xml2obj<span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #339933;">,</span> <span style="color: #000088;">$encoding</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;ISO-8859-1&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">chr</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">9</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">chr</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">10</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #990000;">str_replace</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">chr</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">13</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">path</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\$</span>this-&gt;result&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">path</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\$</span>this&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">index</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #000088;">$xml_parser</span> <span style="color: #339933;">=</span> <span style="color: #990000;">xml_parser_create</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$encoding</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">xml_set_object</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$xml_parser</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">xml_set_element_handler</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$xml_parser</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'startElement'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'endElement'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">xml_set_character_data_handler</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$xml_parser</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'characterData'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #990000;">xml_parse</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$xml_parser</span><span style="color: #339933;">,</span> <span style="color: #000088;">$data</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #990000;">xml_parser_free</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$xml_parser</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">path</span> <span style="color: #339933;">=</span> <span style="color: #009900; font-weight: bold;">null</span><span style="color: #339933;">;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span>_rawXML <span style="color: #339933;">=</span> <span style="color: #000088;">$data</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
	   <span style="color: #000000; font-weight: bold;">function</span> startElement<span style="color: #009900;">&#40;</span><span style="color: #000088;">$parser</span><span style="color: #339933;">,</span> <span style="color: #000088;">$tag</span><span style="color: #339933;">,</span> <span style="color: #000088;">$attributeList</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		   <span style="color: #990000;">eval</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\$</span>vars = get_object_vars(&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">path</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;);&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		   <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">path</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;-&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$tag</span><span style="color: #339933;">;</span>
&nbsp;
		   <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$vars</span> and <span style="color: #990000;">array_key_exists</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$tag</span><span style="color: #339933;">,</span> <span style="color: #000088;">$vars</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> 
		   <span style="color: #009900;">&#123;</span>
				 <span style="color: #990000;">eval</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\$</span>data = &quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">path</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
					 <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">is_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> 
					 <span style="color: #009900;">&#123;</span>
						   <span style="color: #000088;">$index</span> <span style="color: #339933;">=</span> <span style="color: #990000;">sizeof</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
						   <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">path</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;[&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$index</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;]&quot;</span><span style="color: #339933;">;</span>
					 <span style="color: #009900;">&#125;</span> 
					 <span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">is_object</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> 
					 <span style="color: #009900;">&#123;</span>
						   <span style="color: #990000;">eval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">path</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; = array(&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">path</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;);&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
						   <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">path</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;[1]&quot;</span><span style="color: #339933;">;</span>
					 <span style="color: #009900;">&#125;</span>
		   <span style="color: #009900;">&#125;</span>
		   <span style="color: #990000;">eval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">path</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; = null;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		   <span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$attributeList</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$name</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span>
		   <span style="color: #009900;">&#123;</span>
			   <span style="color: #990000;">eval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">path</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;-&gt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$name</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; = <span style="color: #000099; font-weight: bold;">\$</span>value;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		   <span style="color: #009900;">&#125;</span>
&nbsp;
	   <span style="color: #009900;">&#125;</span>
&nbsp;
   <span style="color: #000000; font-weight: bold;">function</span> endElement<span style="color: #009900;">&#40;</span><span style="color: #000088;">$parser</span><span style="color: #339933;">,</span> <span style="color: #000088;">$tag</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	   <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">path</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">path</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #990000;">strrpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">path</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;-&gt;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
&nbsp;
   <span style="color: #000000; font-weight: bold;">function</span> characterData<span style="color: #009900;">&#40;</span><span style="color: #000088;">$parser</span><span style="color: #339933;">,</span> <span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
	   <span style="color: #990000;">eval</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">path</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot; .= '&quot;</span><span style="color: #339933;">.</span><span style="color: #990000;">trim</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;';&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
   <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

</p>
</div>
<div id="hiddenCodeID31_2" style="display:none">
<p>
<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?</span>
<span style="color: #990000;">header</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'Content-type: text/xml'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;class/class-snoopy.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">require_once</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;class/xml2obj.class.php&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;BLOG_RSS_URL&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">define</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;BLOG_VIDEO_URL&quot;</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// mit Snoopy das Blog-RSS laden</span>
<span style="color: #000088;">$snoopy</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Snoopy<span style="color: #339933;">;</span>	
<span style="color: #000088;">$submit_url</span> <span style="color: #339933;">=</span> BLOG_RSS_URL<span style="color: #339933;">;</span>	
<span style="color: #000088;">$snoopy</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetch</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$submit_url</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Blog-RSS in Objekt umwandeln</span>
<span style="color: #000088;">$xmlObj</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> xml2obj<span style="color: #009900;">&#40;</span><span style="color: #000088;">$snoopy</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">results</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;UTF-8&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Podcast-Feed erstellen</span>
show_podcastfeed_xml<span style="color: #009900;">&#40;</span><span style="color: #000088;">$xmlObj</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
&nbsp;
<span style="color: #666666; font-style: italic;">// Podcast-Feed erstellen</span>
<span style="color: #000000; font-weight: bold;">function</span> show_podcastfeed_xml<span style="color: #009900;">&#40;</span><span style="color: #000088;">$uXmlObj</span><span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000088;">$locDateArray</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">'&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;'</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;rss<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$uXmlObj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">RSS</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">VERSION</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>?<span style="color: #0000ff;">' version=&quot;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$uXmlObj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">RSS</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">VERSION</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'&quot;'</span><span style="color: #339933;">:</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&gt;
	&lt;channel&gt;
		&lt;title&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$uXmlObj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">RSS</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">CHANNEL</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">TITLE</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>?<span style="color: #000088;">$uXmlObj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">RSS</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">CHANNEL</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">TITLE</span><span style="color: #339933;">:</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/title&gt;
		&lt;link&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$uXmlObj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">RSS</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">CHANNEL</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">LINK</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>?<span style="color: #000088;">$uXmlObj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">RSS</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">CHANNEL</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">LINK</span><span style="color: #339933;">:</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/link&gt;
		&lt;description&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$uXmlObj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">RSS</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">CHANNEL</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">DESCRIPTION</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>?<span style="color: #000088;">$uXmlObj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">RSS</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">CHANNEL</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">DESCRIPTION</span><span style="color: #339933;">:</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/description&gt;	
		&lt;language&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$uXmlObj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">RSS</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">CHANNEL</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">LANGUAGE</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>?<span style="color: #000088;">$uXmlObj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">RSS</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">CHANNEL</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">LANGUAGE</span><span style="color: #339933;">:</span><span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/language&gt;
		<span style="color: #000000; font-weight: bold;">&lt;?</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$uXmlObj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">RSS</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">CHANNEL</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ITEM</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #b1b100;">foreach</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$uXmlObj</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">RSS</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">CHANNEL</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">ITEM</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$podcast</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #000088;">$locText</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$podcast</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">DESCRIPTION</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$locLink</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$podcast</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">LINK</span><span style="color: #339933;">;</span>
				<span style="color: #000088;">$locLinkArray</span> <span style="color: #339933;">=</span> <span style="color: #990000;">explode</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;/&quot;</span><span style="color: #339933;">,</span> <span style="color: #000088;">$locLink</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
				<span style="color: #666666; font-style: italic;">// Datum des Postings für das Videodatum ermitteln</span>
				<span style="color: #000088;">$locDate</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$locLinkArray</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">3</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;-&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$locLinkArray</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">4</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;-&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$locLinkArray</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">5</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
				<span style="color: #000000; font-weight: bold;">?&gt;</span>
				&lt;item&gt;
					&lt;title&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$podcast</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">TITLE</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/title&gt;
					&lt;description&gt;&lt;![CDATA[<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #990000;">html_entity_decode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$locText</span><span style="color: #339933;">,</span> <span style="color: #009900; font-weight: bold;">ENT_QUOTES</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;UTF-8&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #000000; font-weight: bold;">?&gt;</span>]]&gt;&lt;/description&gt;
					&lt;link&gt;<span style="color: #000000; font-weight: bold;">&lt;?=</span><span style="color: #000088;">$locLink</span><span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/link&gt;
					<span style="color: #000000; font-weight: bold;">&lt;?</span> 
					<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">in_array</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$locDate</span><span style="color: #339933;">,</span> <span style="color: #000088;">$locDateArray</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> 						
						<span style="color: #000088;">$locDateArray</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$locDate</span><span style="color: #339933;">;</span>
						<span style="color: #000000; font-weight: bold;">?&gt;</span>
						&lt;enclosure url=&quot;<span style="color: #000000; font-weight: bold;">&lt;?=</span>BLOG_VIDEO_URL<span style="color: #339933;">.</span><span style="color: #000088;">$locDate</span><span style="color: #000000; font-weight: bold;">?&gt;</span>.mov&quot; length=&quot;12&quot; type=&quot;video/quicktime&quot;/&gt;
					<span style="color: #000000; font-weight: bold;">&lt;?</span> <span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>
				&lt;/item&gt;
				<span style="color: #000000; font-weight: bold;">&lt;?</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
		<span style="color: #000000; font-weight: bold;">?&gt;</span>
	&lt;/channel&gt;
	&lt;/rss&gt;	
	<span style="color: #000000; font-weight: bold;">&lt;?</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

</p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.thatswinnie.com/2007-09-10/postcast-feed/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
