<?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>Leben des wolf-u.li &#187; Blog</title>
	<atom:link href="http://wolf-u.li/tag/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://wolf-u.li</link>
	<description>This and That.</description>
	<lastBuildDate>Mon, 30 Aug 2010 20:58:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/>		<item>
		<title>Wordpress 3.0 &#8220;Thelonious&#8221; ist verf&#252;gbar</title>
		<link>http://wolf-u.li/3510/wordpress-3-0-thelonious-ist-verfuegbar/?piwik_campaign=rss</link>
		<comments>http://wolf-u.li/3510/wordpress-3-0-thelonious-ist-verfuegbar/#comments</comments>
		<pubDate>Fri, 18 Jun 2010 13:19:18 +0000</pubDate>
		<dc:creator>Uli</dc:creator>
				<category><![CDATA[Infotech]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Update]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://wolf-u.li/?p=3510</guid>
		<description><![CDATA[Wie Matt gestern abend per Mail verschickt hat, ist Wordpress 3.0 fertig zum Download. An dieser Stelle verweise ich f&#252;r die neuen Features einfach an Wordpress.org bzw. wordpress-deutschland.org und binde nur die Film-Tour durch neue Wordpress hier ein.


Ich pers&#246;nlich finde die ShortLink-Option (bisher realisiere ich das einfach so, dass ich nur auf die Beitragsnummer, also [...]]]></description>
			<content:encoded><![CDATA[<p>Wie Matt gestern abend per Mail verschickt hat, ist Wordpress 3.0 fertig zum Download. An dieser Stelle verweise ich f&#252;r die neuen Features einfach an <a href="http://wordpress.org/development/2010/06/thelonious/">Wordpress.org</a> bzw. <a href="http://blog.wordpress-deutschland.org/2010/06/15/wordpress-3-0-thelonious-ist-da.html">wordpress-deutschland.org</a> und binde nur die Film-Tour durch neue Wordpress hier ein.<br />
<span id="more-3510"></span><br />
<embed  src="http://v.wordpress.com/wp-content/plugins/video/flvplayer.swf?ver=1.21"  type="application/x-shockwave-flash" width="500" height="280" wmode="transparent" seamlesstabbing="true" allowfullscreen="true" allowscriptaccess="always" overstretch="true" flashvars="guid=BQtfIEY1&amp;width=500&amp;height=280&amp;locksize=no&amp;dynamicseek=false&amp;qc_publisherId=p-18-mFEk4J448M"  title="Introducing WordPress 3.0 &quot;Thelonious&quot;"></embed></p>
<p>Ich pers&#246;nlich finde die <a href="http://blog.wordpress-deutschland.org/2010/04/20/shortlinks-mit-wordpress-3-0.html">ShortLink-Option</a> (bisher realisiere ich das einfach so, dass ich nur auf die Beitragsnummer, also z.b. http://wolf-u.li/3510/ verlinke) und das neue Men&#252;system zum erstellen von Navigationsmen&#252;s am spannendsten.</p>
<hr /><small><center>&copy; 2005-2009 by <a href='http://wolf-u.li/'>Uli Wolf</a> &#8211; This Content is distributed under the <a href='http://wolf-u.li/pwnd-faq/'>Creative Commons License</a><br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites without attribution to the author and notification of the author breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:  d2a576b5311479d89eff39b7ca886f6b)</center></small>]]></content:encoded>
			<wfw:commentRss>http://wolf-u.li/3510/wordpress-3-0-thelonious-ist-verfuegbar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Umleitung bei ausschlie&#223;licher Angabe der post_id in der URL auf den vollen Wordpress-Permalink mittels Nginx</title>
		<link>http://wolf-u.li/3385/umleitung-bei-ausschliesslicher-angabe-der-post_id-in-der-url-auf-den-vollen-wordpress-permalink-mittels-nginx/?piwik_campaign=rss</link>
		<comments>http://wolf-u.li/3385/umleitung-bei-ausschliesslicher-angabe-der-post_id-in-der-url-auf-den-vollen-wordpress-permalink-mittels-nginx/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 16:05:56 +0000</pubDate>
		<dc:creator>Uli</dc:creator>
				<category><![CDATA[Infotech]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[Webserver]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://wolf-u.li/?p=3385</guid>
		<description><![CDATA[Ich poste mittels Twitpress meine Eintr&#228;ge auf Twitter, wobei ich die URL zum Eintrag mittels der ID des Posts, also im Fall dieses Posts 3385, angebe. Dies sieht dann so aus:
Neuer Blog-Eintrag: Umleitung bei ausschlie&#223;licher Angabe der post_id in der URL auf den vollen Wordpress-Permalink mittels Nginx http://wolf-u.li/3385/
Fr&#252;her wurde dann per Wordpress auf die volle [...]]]></description>
			<content:encoded><![CDATA[<p>Ich poste mittels <a href="http://wordpress.org/extend/plugins/twitpress/">Twitpress</a> meine Eintr&#228;ge auf <a href="http://twitter.com/wolfuli">Twitter</a>, wobei ich die URL zum Eintrag mittels der ID des Posts, also im Fall dieses Posts 3385, angebe. Dies sieht dann so aus:</p>
<blockquote><p>Neuer Blog-Eintrag: Umleitung bei ausschlie&#223;licher Angabe der post_id in der URL auf den vollen Wordpress-Permalink mittels Nginx http://wolf-u.li/3385/</p></blockquote>
<p>Fr&#252;her wurde dann per Wordpress auf die volle URL umgeleitet, jedoch funktioniert dies in der Version 2.9.2, die ich momentan fahre, nicht mehr so. Das f&#252;hrte dazu, dass unter http://wolf-u.li/3385/ und der langen Url des Beitrags der gleiche Inhalt angezeigt wurde, was zu Problemen mit den Suchmaschinen f&#252;hren kann. Da ich keinen Bock hatte, mich bei mir auf Fehlersuche zu begeben, habe ich kurz gegoogled und festgestellt, dass dies f&#252;r Version 3.1 von Wordpress wieder<a href="http://core.trac.wordpress.org/ticket/12456">geplant</a> ist. Ein wenig <a href="http://codex.wordpress.org/Using_Permalinks#Long_Permalinks">Recherche</a> brachte an den Tag, dass man auch manuell per .htaccess (bei Nutzung von Apache) auf <em>index.php?p={POST_ID}</em> umleiten kann.</p>
<p>Da ich den Webserver Nginx (siehe <a href="http://wolf-u.li/3137/leitartikel-zur-konfiguration-und-installation-des-webservers-nginx/">Leitartikel</a>) einsetze, habe ich also nun einfach eine Pr&#252;fung geschrieben, die nachsieht, ob nach wolf-u.li/ einfach nur eine Zahl folg und in diesem Fall auf die index.php leitet, welche dann auf die korrekte lange URL leitet. Die komplette Location k&#246;nnte also so aussehen:</p>
<div class="igBar"><span id="lcode-2"><a href="#" onclick="javascript:showPlainTxt('code-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-2">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">location / <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; if <span style="color:#006600; font-weight:bold;">&#40;</span>-f $request_filename<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; break;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; rewrite ^/<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#800000;color:#800000;">0</span>-<span style="color:#800000;color:#800000;">9</span><span style="color:#006600; font-weight:bold;">&#93;</span>+<span style="color:#006600; font-weight:bold;">&#41;</span>/$ /index.<span style="">php</span>?p=$<span style="color:#800000;color:#800000;">1</span> last;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; rewrite ^<span style="color:#006600; font-weight:bold;">&#40;</span>.+<span style="color:#006600; font-weight:bold;">&#41;</span>$ /index.<span style="">php</span> last;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Zuerst wird gepr&#252;ft, ob der angeforderte Dateiname vorhanden ist. Wenn dem der Fall ist, werden keine weiteren Pr&#252;fungen durchgef&#252;hrt und diese Datei zur&#252;ckgegeben. Wenn nicht, wird zun&#228;chst die oben beschriebene Pr&#252;fung durchgef&#252;hrt. Wurde kein Match ermittelt, so wird einfach nur auf index.php umgeleitet.</p>
<p>Das behob bei mir das Problem des doppelten Contents <img src='http://wolf-u.li/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<hr /><small><center>&copy; 2005-2009 by <a href='http://wolf-u.li/'>Uli Wolf</a> - This Content is distributed under the <a href='http://wolf-u.li/pwnd-faq/'>Creative Commons License</a><br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites without attribution to the author and notification of the author breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:  d2a576b5311479d89eff39b7ca886f6b)</center></small>]]></content:encoded>
			<wfw:commentRss>http://wolf-u.li/3385/umleitung-bei-ausschliesslicher-angabe-der-post_id-in-der-url-auf-den-vollen-wordpress-permalink-mittels-nginx/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Saubere Entfernung von Sprachen im Wordpress-Plugin Global Translator f&#252;r &#220;bersetzungen des Webseiteninhalts</title>
		<link>http://wolf-u.li/3380/saubere-entfernung-von-sprachen-im-wordpress-plugin-global-translator-fuer-uebersetzungen-des-webseiteninhalts/?piwik_campaign=rss</link>
		<comments>http://wolf-u.li/3380/saubere-entfernung-von-sprachen-im-wordpress-plugin-global-translator-fuer-uebersetzungen-des-webseiteninhalts/#comments</comments>
		<pubDate>Sat, 27 Mar 2010 15:37:36 +0000</pubDate>
		<dc:creator>Uli</dc:creator>
				<category><![CDATA[Infotech]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Webserver]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://wolf-u.li/?p=3380</guid>
		<description><![CDATA[In den vergangenen Wochen habe ich mich ein wenig mit meinem Google Webmasters Panel auseinander gesetzt und den ein oder anderen Fehler ausgemerzt, der dazu f&#252;hren k&#246;nnte, dass ich erneut meinen PageRank verliere. Dies war bereits im Juli letzten Jahres geschehen, da ich wohl zuviele nicht erreichbare Seiten hatte. Mittlerweile habe ich wieder meinen damaligen [...]]]></description>
			<content:encoded><![CDATA[<p>In den vergangenen Wochen habe ich mich ein wenig mit meinem Google Webmasters Panel auseinander gesetzt und den <a href="http://wolf-u.li/3365/haeufung-von-fehler-unerreichbar-in-google-webmaster-tools-aufgrund-von-global-translator-und-parameter-replytocom/">ein</a> oder anderen Fehler ausgemerzt, der dazu f&#252;hren k&#246;nnte, dass ich erneut meinen PageRank verliere. Dies war bereits im Juli letzten Jahres geschehen, da ich wohl zuviele nicht erreichbare Seiten hatte. Mittlerweile habe ich wieder meinen damaligen <a href="http://wolf-u.li/2892/wolf-uli-hat-pagerank-3-bekommen/">PR3</a>, de ich auch gerne behalten m&#246;chte.<br />
<span id="more-3380"></span><br />
Damals war das Plugin Global Translator daf&#252;r verantwortlich, welches bei einer nicht vorhandenen &#220;bersetzung ein 404 ausgespuckt hatte, was Google nicht so sehr gefallen hatte. Mittlerweile siehts in meinen Google Webmaster Tools schon wieder nicht so rosig aus. Da der Anteil ausl&#228;ndischer Besucher aus L&#228;ndern, deren Sprache nicht Englisch oder Chinesisch ist, t&#228;glich nur bei ~2% liegt, habe ich mich nun entschlossen, alle &#252;berfl&#252;ssigen Sprachen zu entfernen, um mehr Anfragen f&#252;r die &#220;bersetzungen der Sprachen Englisch und Deutsch verf&#252;gbar zu haben. Nat&#252;rlich ist das nicht so leicht, da ja doch mittlerweile knapp 12k Seiten im Google Index gelandet sind und ich f&#252;r Unerreichbarkeit keine Schelte bekommen m&#246;chte <img src='http://wolf-u.li/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Der mehrstufige Actionplan sieht nun folgendes vor:</p>
<ul>
<li>Erstellung von Rewrite-Rules f&#252;r nginx zur 301-Umleitung (Moved Permanentely) auf Webserverebene</li>
<li>Beantragung der Entfernung der &#220;bersetzungen aus dem Google Suchindex</li>
<li>Anpassen der Einstellungen in Global Translator</li>
<li>Entfernung der &#252;berfl&#252;ssigen &#220;bersetzungsverzeichnisse</li>
<li>Aktualisierung des Page-Cache</li>
</ul>
<p><strong>Erstellung von Rewrite-Rules f&#252;r nginx zur 301-Umleitung</strong><br />
Die &#220;bersetzungslinks sollen f&#252;r eventuelle, schon vorhandene Verlinkungen, auf den Originalartikel umgeleitet werden. Da ich, wie vielleicht einige wissen, als Webserver Nginx einsetze (Siehe <a href="http://wolf-u.li/3137/leitartikel-zur-konfiguration-und-installation-des-webservers-nginx/">Leitartikel</a>), ben&#246;tige ich hierf&#252;r die entsprechenden Rewrite-Rules. Leider bin ich ein Experte in Regex, jedoch funzt der folgende Code:</p>
<div class="igBar"><span id="lcode-4"><a href="#" onclick="javascript:showPlainTxt('code-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-4">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">location ~* ^/<span style="color:#006600; font-weight:bold;">&#40;</span>ar|be|ca|cs|da|el|es|et|fa|fi|fr|ga|gl|hu|is|ko|mk|ms|mt|nl|bg|hr|id|it|hi|iw|ja|no|lv|lt|pl|pt|ru|sk|sl|sq|sr|sv|ro|th|tl|tr|uk|vi<span style="color:#006600; font-weight:bold;">&#41;</span>/ <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; rewrite ^/<span style="color:#006600; font-weight:bold;">&#40;</span>ar|be|ca|cs|da|el|es|et|fa|fi|fr|ga|gl|hu|is|ko|mk|ms|mt|nl|bg|hr|id|it|hi|iw|ja|no|lv|lt|pl|pt|ru|sk|sl|sq|sr|sv|ro|th|tl|tr|uk|vi<span style="color:#006600; font-weight:bold;">&#41;</span>/<span style="color:#006600; font-weight:bold;">&#40;</span>.*<span style="color:#006600; font-weight:bold;">&#41;</span>$ /$<span style="color:#800000;color:#800000;">2</span> permanent;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Er muss mit in den Server-Teil der betreffenden Blog-Domain eingebaut werden. Vermutlich k&#246;nnte man von der Location her direkt die Sprache capturen, so wie oben funzt es aber auf jeden Fall <img src='http://wolf-u.li/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Die Sprachen "en", "zh-CN" und "zh-TW" habe ich weggelassen, da ich diese vorerst weiter behalte.</p>
<p><strong>Beantragung der Entfernung der &#220;bersetzungen aus dem Google Suchindex</strong><br />
Bis dato hatte ich von den angebotenen Sprachen des Global Translator nur jene aktiviert, die seitens Google Adsense erlaubt sind. Diese m&#252;ssen nun &#252;ber die Google Webmaster Tools entfernt werden.<br />
Dazu loggt man sich zun&#228;chst <a href="https://www.google.com/webmasters/tools/">dort</a> ein. Man w&#228;hlt die betreffende Webseite und geht zu "<em>Website-Konfiguration</em>" -> "<em>Crawler-Zugriff</em>". Dort klickt man auf den Tab "URL entfernen". Im folgenden Auswahlfenster w&#228;hlt man dann als Option "Ein Verzeichnis sowie alle Unterverzeichnisse auf der Website", da wir beispielsweise /ar/* entfernen m&#246;chten. Im n&#228;chsten Eingabefeld muss dann <strong>ar/</strong> eingegeben werden.<br />
<a rel="lightbox[gtlang]" href="http://wolf-u.li/upload/2010/03/3380-Google-Webmaster-Tools-01.png"><img src="http://wolf-u.li/upload/2010/03/3380-Google-Webmaster-Tools-01-150x150.png" alt="" title="3380-Google-Webmaster-Tools-01" width="150" height="150" class="alignnone size-thumbnail wp-image-3381" /></a><a rel="lightbox[gtlang]" href="http://wolf-u.li/upload/2010/03/3380-Google-Webmaster-Tools-02.png"><img src="http://wolf-u.li/upload/2010/03/3380-Google-Webmaster-Tools-02-150x150.png" alt="" title="3380-Google-Webmaster-Tools-02" width="150" height="150" class="alignnone size-thumbnail wp-image-3382" /></a><a rel="lightbox[gtlang]" href="http://wolf-u.li/upload/2010/03/3380-Google-Webmaster-Tools-03.png"><img src="http://wolf-u.li/upload/2010/03/3380-Google-Webmaster-Tools-03-150x150.png" alt="" title="3380-Google-Webmaster-Tools-03" width="150" height="150" class="alignnone size-thumbnail wp-image-3383" /></a></p>
<p>Laut <a href="http://www.google.com/support/webmasters/bin/answer.py?answer=59819&#038;hl=de">Google</a> sollte man ausserdem nun die robots.txt anpassen, da ein 301 Redirect nicht als "nicht mehr erreichbar" gilt. Hierzu legt man f&#252;r jede entfernte Sprache ein</p>
<blockquote><p><code>Disallow: /{SPRACHCODE}/</code></p></blockquote>
<p>an, sodass dies dann beispielsweise so aussieht:</p>
<blockquote><p><code>User-agent: *<br />
Allow: /<br />
Disallow: /ar/</code></p></blockquote>
<p><strong>Anpassen der Einstellungen in Global Translator</strong><br />
Nun rate ich dazu, die Sprachen im Plugin zu entfernen. Bei mir bleiben derzeit nur "en", "zh-CN" und "zh-TW" &#252;brig, den Rest habe ich deaktiviert. Nach dem Speichern sollte die Sitemap neu erzeugt werden, da nun die &#252;berfl&#252;ssigen Sprachen wegfallen.</p>
<p><strong>Entfernung der &#252;berfl&#252;ssigen &#220;bersetzungsverzeichnisse</strong><br />
Hat man die obigen Schritte erfolgreich durchgef&#252;hrt, so k&#246;nnen die &#252;berfl&#252;ssigen &#220;bersetzungsverzeichnisse gel&#246;scht werden. Gl&#252;cklich ist, wer Shellzugriff hat, da gehts etwas schneller als per FTP <img src='http://wolf-u.li/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . Die &#220;bersetzungen finden sich in <em>{WORDPRESS_HOME}/wp-content/gt-cache/</em>. Ich w&#252;rde das Verzeichnis "stale" nicht mitl&#246;schen, auch dort w&#252;rde ich nur die nicht mehr ben&#246;tigten Sprachen entfernen.</p>
<p><strong>Aktualisierung des Page-Cache</strong><br />
Ich setze f&#252;r das Cachen meiner Seiten das Plugin <a href="http://wordpress.org/extend/plugins/wp-super-cache/">WP-Super-Cache</a> ein, welches nun auch aktualisiert werden sollte. Ein Klick auf "<em>Delete Cach</em>e" auf der Einstellungsseite des Plugins w&#252;rde dies durchf&#252;hren. Ich pers&#246;nlich verwende aber zus&#228;tzlich das Plugin "<a href="http://wordpress.org/extend/plugins/askapache-crazy-cache/">Askapache Crazy Cache</a>", welches mir erlaubt, schnell alle Seiten neu zu cachen. Auf einem shared Webspace macht dies jedoch nur begrenzt Sinn, da die CPU-zeit h&#228;ufig begrenzt ist.</p>
<p>Fazit: So bin ich nun relativ sauber die &#252;berfl&#252;ssigen Sprachen losgeworden und hoffe so die nicht erreichten Seiteninhalte reduzieren zu k&#246;nnen.<img src="http://vg07.met.vgwort.de/na/16f6cb75093d45079fa171459a0a315c" width="1" height="1" alt=""></p>
<hr /><small><center>&copy; 2005-2009 by <a href='http://wolf-u.li/'>Uli Wolf</a> - This Content is distributed under the <a href='http://wolf-u.li/pwnd-faq/'>Creative Commons License</a><br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites without attribution to the author and notification of the author breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:  d2a576b5311479d89eff39b7ca886f6b)</center></small>]]></content:encoded>
			<wfw:commentRss>http://wolf-u.li/3380/saubere-entfernung-von-sprachen-im-wordpress-plugin-global-translator-fuer-uebersetzungen-des-webseiteninhalts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>H&#228;ufung von Fehler &#8220;Unerreichbar&#8221; in Google Webmaster Tools aufgrund von Global Translator und Parameter replytocom</title>
		<link>http://wolf-u.li/3365/haeufung-von-fehler-unerreichbar-in-google-webmaster-tools-aufgrund-von-global-translator-und-parameter-replytocom/?piwik_campaign=rss</link>
		<comments>http://wolf-u.li/3365/haeufung-von-fehler-unerreichbar-in-google-webmaster-tools-aufgrund-von-global-translator-und-parameter-replytocom/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 21:25:03 +0000</pubDate>
		<dc:creator>Uli</dc:creator>
				<category><![CDATA[Infotech]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://wolf-u.li/?p=3365</guid>
		<description><![CDATA[In den letzten Tagen haben sich bei mir in den Google Webmaster-Tools sehr viele "Unerreichbar"-Fehler aufgrund des dynamischen "replytocom"-Parameters angeh&#228;uft. Dieser wird bei, von Global Translator &#252;bersetzten, Seiten an verlinkungen der Kommentare angeh&#228;ngt, was Google wohl nicht so gut verpackt.
Die L&#246;sung ist sehr einfach: Man gehe in die betroffene Seite, klicke links auf "Website-Konfiguration" und [...]]]></description>
			<content:encoded><![CDATA[<p>In den letzten Tagen haben sich bei mir in den Google Webmaster-Tools sehr viele "Unerreichbar"-Fehler aufgrund des dynamischen "replytocom"-Parameters angeh&#228;uft. Dieser wird bei, von Global Translator &#252;bersetzten, Seiten an verlinkungen der Kommentare angeh&#228;ngt, was Google wohl nicht so gut verpackt.</p>
<p>Die L&#246;sung ist sehr einfach: Man gehe in die betroffene Seite, klicke links auf "Website-Konfiguration" und anschlie&#223;end "Einstellungen". Dort tr&#228;gt man am Ende der Seite unter "Parameterbehandlung" den Parameter "replytocom" mit der Aktion "Ignorieren" ein.<br />
<span id="more-3365"></span><br />
Sieht dann so aus:<br />
<a rel="lightbox" href="http://wolf-u.li/upload/2010/03/3365-Google-Parameter-ignorieren.png"><img src="http://wolf-u.li/upload/2010/03/3365-Google-Parameter-ignorieren-500x91.png" alt="Parametereinstellungen in Google Webmaster Tools" title="Parametereinstellungen in Google Webmaster Tools" width="500" height="91" class="aligncenter size-medium wp-image-3366" /></a></p>
<hr /><small><center>&copy; 2005-2009 by <a href='http://wolf-u.li/'>Uli Wolf</a> - This Content is distributed under the <a href='http://wolf-u.li/pwnd-faq/'>Creative Commons License</a><br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites without attribution to the author and notification of the author breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:  d2a576b5311479d89eff39b7ca886f6b)</center></small>]]></content:encoded>
			<wfw:commentRss>http://wolf-u.li/3365/haeufung-von-fehler-unerreichbar-in-google-webmaster-tools-aufgrund-von-global-translator-und-parameter-replytocom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bildercache f&#252;r den Webserver nginx am Beispiel von Gravatar-Icons</title>
		<link>http://wolf-u.li/3348/bildercache-fuer-den-webserver-nginx-am-beispiel-von-gravatar-icons/?piwik_campaign=rss</link>
		<comments>http://wolf-u.li/3348/bildercache-fuer-den-webserver-nginx-am-beispiel-von-gravatar-icons/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 18:57:57 +0000</pubDate>
		<dc:creator>Uli</dc:creator>
				<category><![CDATA[Infotech]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Webserver]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://wolf-u.li/?p=3348</guid>
		<description><![CDATA[Dieser Artikel ist Teil einer Reihe zum Webserver nginx.Schau dir auch die anderen Artikel an: Zum Leitartikel
Vor einigen Tagen schrieb ich bereits &#252;ber eine M&#246;glichkeit, die Gravatar-Icons lokal zwischen zu speichern. Leider wurde dabei bei jedem Aufruf eines Bildes immer einen php-call gemacht, was mir bei manchen Beitr&#228;gen das Blog in die Knie zwingen w&#252;rde [...]]]></description>
			<content:encoded><![CDATA[<div class="wolfuliannounce">Dieser Artikel ist Teil einer Reihe zum Webserver nginx.<br />Schau dir auch die anderen Artikel an: <a href="http://wolf-u.li/3137/leitartikel-zur-konfiguration-und-installation-des-webservers-nginx/">Zum Leitartikel</a></div>
<p>Vor einigen Tagen <a href="http://wolf-u.li/3347/auslieferung-von-gravatar-icons-aus-einem-lokalen-cache-download-per-curl/">schrieb</a> ich bereits &#252;ber eine M&#246;glichkeit, die Gravatar-Icons lokal zwischen zu speichern. Leider wurde dabei bei jedem Aufruf eines Bildes immer einen php-call gemacht, was mir bei manchen Beitr&#228;gen das Blog in die Knie zwingen w&#252;rde und dem eigentlich gew&#252;nschten Effekt (Beschleunigung) entgegenstehen w&#252;rde. Daher habe ich mir mal die Funktionen meines Webservers nginx angesehen und dabei festgestellt, dass dieser die folgende Pr&#252;fung erlaubt:</p>
<ul>
<li>Ist das Bild vorhanden?
<ul>
<li>Wenn ja: Direkte Auslieferung</li>
<li>Wenn nein: Aufruf einer PHP-Datei zum Download des Bildes</li>
</ul>
</li>
</ul>
<p><span id="more-3348"></span><br />
Die Umsetzung war dann einfach:</p>
<p>Das ist die Konfigurationsdatei f&#252;r den vHost in nginx:</p>
<div class="igBar"><span id="lcode-9"><a href="#" onclick="javascript:showPlainTxt('code-9'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-9">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">server <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; listen&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">80</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; server_name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;img.<span style="">yourdomain</span>.<span style="">tld</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; error_log&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/path/to/your/logs/error/img.<span style="">yourdomain</span>.<span style="">tld</span>.<span style="">log</span> warn;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; root&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /path/to/your/document/root/;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; location ~ \.<span style="">php</span>$ <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; fastcgi_pass&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#800000;color:#800000;">127</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">0</span>.<span style="color:#800000;color:#800000;">1</span>:<span style="color:#800000;color:#800000;">1234</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; include&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/etc/nginx/fastcgi_params;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; location / <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; index&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cdn.<span style="">php</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; # if the requested file exists, return it immediately</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; if <span style="color:#006600; font-weight:bold;">&#40;</span>-f $request_filename<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; # all other requests go to CDN-PHP-File</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; if <span style="color:#006600; font-weight:bold;">&#40;</span>!-e $request_filename<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rewrite ^<span style="color:#006600; font-weight:bold;">&#40;</span>.+<span style="color:#006600; font-weight:bold;">&#41;</span>$ /cdn.<span style="">php</span> last;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Nun speichert man in <code>/path/to/your/document/root/</code> die Datei cdn.php mit folgendem Inhalt:</p>
<div class="igBar"><span id="lcode-10"><a href="#" onclick="javascript:showPlainTxt('code-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-10">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;?php</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Script by Uli Wolf - http://wolf-u.li</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Modify the settings below according to your needs:</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Size of the gravatar-images:</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$gimagesize = <span style="color:#800000;color:#800000;">32</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// If the mailadress was not found, you can get various images:</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// - identicon</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// - monsterid</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// - wavatar</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$mailnotfound = <span style="color:#CC0000;">"identicon"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$removefromurl = array<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"/g/"</span>,<span style="color:#CC0000;">"/"</span>,<span style="color:#CC0000;">".png"</span>,<span style="color:#CC0000;">".jpg"</span>,<span style="color:#CC0000;">".gif"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$gravatar_hash = str_replace<span style="color:#006600; font-weight:bold;">&#40;</span>strtolower<span style="color:#006600; font-weight:bold;">&#40;</span>$removefromurl<span style="color:#006600; font-weight:bold;">&#41;</span>,<span style="color:#CC0000;">""</span>,$_SERVER<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#CC0000;">"REQUEST_URI"</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$gravatar_hash = preg_replace<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"/[^a-z0-9<span style="color:#000099; font-weight:bold;">\s</span>]/"</span>, <span style="color:#CC0000;">""</span>, $gravatar_hash<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">if<span style="color:#006600; font-weight:bold;">&#40;</span>strlen<span style="color:#006600; font-weight:bold;">&#40;</span>$gravatar_hash<span style="color:#006600; font-weight:bold;">&#41;</span>!=<span style="color:#800000;color:#800000;">32</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span>exit;<span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$grav_img = <span style="color:#CC0000;">"http://www.gravatar.com/avatar/"</span> . $gravatar_hash . <span style="color:#CC0000;">"?s="</span> . $gimagesize . <span style="color:#CC0000;">"&amp;d="</span> . $mailnotfound . <span style="color:#CC0000;">"&amp;r=G"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">if<span style="color:#006600; font-weight:bold;">&#40;</span>extension_loaded<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">'curl'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; $gch = curl_init<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; $gcurl_options = array<span style="color:#006600; font-weight:bold;">&#40;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; CURLOPT_URL =&gt; $grav_img,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; CURLOPT_HEADER =&gt; false,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; CURLOPT_RETURNTRANSFER =&gt; true,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; CURLOPT_TIMEOUT =&gt; <span style="color:#800000;color:#800000;">20</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; CURLOPT_BINARYTRANSFER =&gt; true,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; CURLOPT_MAXREDIRS =&gt; <span style="color:#800000;color:#800000;">2</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; curl_setopt_array<span style="color:#006600; font-weight:bold;">&#40;</span>$gch, $gcurl_options<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; $gdata = curl_exec<span style="color:#006600; font-weight:bold;">&#40;</span>$gch<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; curl_close <span style="color:#006600; font-weight:bold;">&#40;</span>$gch<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; unset<span style="color:#006600; font-weight:bold;">&#40;</span>$gch<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> else <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ob_start<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; $gfilehandle_url = fopen<span style="color:#006600; font-weight:bold;">&#40;</span>$grav_img, <span style="color:#CC0000;">"rb"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; fpassthru<span style="color:#006600; font-weight:bold;">&#40;</span>$gfilehandle_url<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; fclose<span style="color:#006600; font-weight:bold;">&#40;</span>$gfilehandle_url<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; $gdata = ob_get_contents<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ob_end_clean<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; unset<span style="color:#006600; font-weight:bold;">&#40;</span>$gfilehandle_url<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$gfilehandle_img = fopen<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">"g/"</span> . $gravatar_hash . <span style="color:#CC0000;">".png"</span>, <span style="color:#CC0000;">"wb+"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">fwrite<span style="color:#006600; font-weight:bold;">&#40;</span>$gfilehandle_img, $gdata<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">fclose<span style="color:#006600; font-weight:bold;">&#40;</span>$gfilehandle_img<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">unset<span style="color:#006600; font-weight:bold;">&#40;</span>$gfilehandle_img<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">header<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">'content-type: image/png'</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">echo $gdata;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">?&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Was macht diese Datei?</p>
<p>Oben kann man zun&#228;chst einstellen, wie gro&#223; die Bilder sein sollen und welches Bild angezeigt werden soll, wenn nix hinterlegt ist. Anschlie&#223;end wird eine Pr&#252;fung der URL durchgef&#252;hrt, die einige m&#246;gliche Angriffsvektoren ausfiltern soll. Dabei bleiben dann nur Strings mit 32 Zeichen in Gro&#223;- und Kleinbuchstaben &#252;brig, andernfalls wird das Script beendet. Im Anschluss wird dann das Bild geholt (per curl, wenn m&#246;glich), gespeichert und ausgegeben. Das verzeichnis /path/to/your/document/root/<strong>g/</strong> sollte hierzu vorhanden sein.</p>
<p>Warum der Unterordner /g/? Ich wollte mir damit offen halten, verschiedene Bildertypen zu cachen. Das habe ich gel&#246;st, indem ich meinen Bilderhashes ein "<code>/g/</code>" vorstelle, welches diese als Gravatar-Bilder markiert. F&#228;llt mir also irgendwann mal ein, dass ich beispielsweise gerne noch <a href="http://pavatar.com/">Pavatar</a> (wie auch immer geartet) cachen m&#246;chte, dann kann ich dies hier einbauen.</p>
<p>Meine Url sieht also am Ende so aus:</p>
<blockquote><p><code>http://img.yourdomain.tld/g/a9ec4695d424a6dcb6f896afb0ee22bc.png</code></p></blockquote>
<p>und wird bei ersten Aufruf gecached mittels php und anschlie&#223;end in den weiteren Aufrufen immer statisch durch den Webserver ausgegeben. M&#246;chte man nun regelm&#228;&#223;ig die Bilder aktualisieren, empfiehlt es sich, das <a href="http://wolf-u.li/3347/auslieferung-von-gravatar-icons-aus-einem-lokalen-cache-download-per-curl/">hier</a> bereits vorgestellte Script in regelm&#228;&#223;igen Abst&#228;nden laufen zu lassen.</p>
<p>F&#252;r den Einbau in Wordpress ist das ganze auch recht einfach. Man &#246;ffnet die comments.php und sucht darin den Aufruf:</p>
<div class="igBar"><span id="lcode-11"><a href="#" onclick="javascript:showPlainTxt('code-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-11">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;?php echo get_avatar<span style="color:#006600; font-weight:bold;">&#40;</span> $comment, <span style="color:#800000;color:#800000;">32</span><span style="color:#006600; font-weight:bold;">&#41;</span>; ?&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Diesen ersetzt man dann durch:</p>
<div class="igBar"><span id="lcode-12"><a href="#" onclick="javascript:showPlainTxt('code-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-12">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;?php echo <span style="color:#CC0000;">"&lt;img src='http://img.yourdomain.tld/g/"</span> . <span style="">md5</span><span style="color:#006600; font-weight:bold;">&#40;</span>strtolower<span style="color:#006600; font-weight:bold;">&#40;</span>get_comment_author_email<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> . <span style="color:#CC0000;">".png' height='32' width='32'&gt;"</span>; ?&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Wobei die Domain und die Gr&#246;&#223;e nat&#252;rlich austauschbar sind.</p>
<p>Zu guter letzt noch ein Hinweis f&#252;r Apache-Nutzer: Das PHP-Script l&#228;sst sich nat&#252;rlich auch mit diesem Webserver nutzen.</p>
<hr /><small><center>&copy; 2005-2009 by <a href='http://wolf-u.li/'>Uli Wolf</a> - This Content is distributed under the <a href='http://wolf-u.li/pwnd-faq/'>Creative Commons License</a><br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites without attribution to the author and notification of the author breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:  d2a576b5311479d89eff39b7ca886f6b)</center></small>]]></content:encoded>
			<wfw:commentRss>http://wolf-u.li/3348/bildercache-fuer-den-webserver-nginx-am-beispiel-von-gravatar-icons/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Auslieferung von Gravatar-Icons aus einem lokalen Cache &#8211; Download per curl</title>
		<link>http://wolf-u.li/3347/auslieferung-von-gravatar-icons-aus-einem-lokalen-cache-download-per-curl/?piwik_campaign=rss</link>
		<comments>http://wolf-u.li/3347/auslieferung-von-gravatar-icons-aus-einem-lokalen-cache-download-per-curl/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 10:25:17 +0000</pubDate>
		<dc:creator>Uli</dc:creator>
				<category><![CDATA[Infotech]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://wolf-u.li/?p=3347</guid>
		<description><![CDATA[Vor einigen Tagen bin ich &#252;ber Crazytoast auf einem Blog auf die Idee der Auslieferung der Gravatar-Bilder aus einem lokalen Cache gesto&#223;en. Prinzipiell fand ich das keine schlechte Idee, da auch bei mir einige Ladezeit von Gravatar verursacht wird. Auch der regelm&#228;&#223;ige Refresh erschien mir als durchaus sinnvoll. Lediglich die Art der Einbindung wollte mir [...]]]></description>
			<content:encoded><![CDATA[<p>Vor einigen Tagen bin ich &#252;ber <a href="http://www.crazytoast.de/2010/02/bloggen/gravatar-cache-fuer-wordpress-ohne-plugin.html">Crazytoast</a> auf einem <a href="http://www.plerzelwupp.de/wordpress-gravatare-cachen/">Blog</a> auf die Idee der Auslieferung der Gravatar-Bilder aus einem lokalen Cache gesto&#223;en. Prinzipiell fand ich das keine schlechte Idee, da auch bei mir einige Ladezeit von Gravatar verursacht wird. Auch der regelm&#228;&#223;ige Refresh erschien mir als durchaus sinnvoll. Lediglich die Art der Einbindung wollte mir noch nicht so recht gefallen. Auch programmiertechnisch fehlten mir einige Dinge.<br />
<span id="more-3347"></span><br />
So wurde beispielsweise als einzige M&#246;glichkeit des Herunterladen der Bilder die Funktion <em>fopen()</em> angeboten, welche jedoch bei den meisten Hostern deaktiviert (<em>allow_url_fopen=0</em>) wird, da es durchaus gen&#252;gend Beispiele f&#252;r Sicherheitsl&#252;cken welche durch die unkluge Nutzung dieser Funktion gibt. Aus <a href="http://dev.piwik.org/trac/ticket/793">meinem</a> <a href="http://wolf-u.li/3141/piwik-0-4-3-ist-erschienen/">Patch</a> f&#252;r Piwik habe ich daher einen Teil des Codes extrahiert, welcher es mir erlaubt, <em>curl</em> zu benutzen.</p>
<p>Wie bei Plerzelwupp beschrieben muss man zun&#228;chst die comments.php &#246;ffnen und die folgende Zeile suchen:</p>
<div class="igBar"><span id="lcode-16"><a href="#" onclick="javascript:showPlainTxt('code-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-16">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;?php echo get_avatar<span style="color:#006600; font-weight:bold;">&#40;</span> $comment, <span style="color:#800000;color:#800000;">60</span><span style="color:#006600; font-weight:bold;">&#41;</span>; ?&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Das zweite Argument der Gr&#246;&#223;e k&#246;nnte bei euch auch durchaus anders aussehen!</p>
<p>Wie auch immer, man l&#246;scht jedenfalls diese Zeile und setzt daf&#252;r den folgenden Code ein:</p>
<div class="igBar"><span id="lcode-17"><a href="#" onclick="javascript:showPlainTxt('code-17'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-17">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;?php</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Script originally from:</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// http://www.plerzelwupp.de/wordpress-gravatare-cachen/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Modified by Uli from http://wolf-u.li:</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// - Translation</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// - Cleanup</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// - Added curl</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Modify the settings below according to your needs:</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Path to the cache-directory of the gravatar images:</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$gimagecachedir &nbsp; &nbsp; &nbsp; &nbsp; = <span style="color:#CC0000;">"upload/g/"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Path of the directory of the gravatar-images:</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$gimageurldomain = <span style="color:#CC0000;">"http://wolf-u.li/upload/g/"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Size of the gravatar-images:</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$gimagesize = <span style="color:#800000;color:#800000;">64</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// If the mailadress was not found, you can get various images:</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// - identicon</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// - monsterid</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// - wavatar</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$mailnotfound = <span style="color:#CC0000;">"identicon"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Do not modify the code below:</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$gravatar_hash = md5<span style="color:#006600; font-weight:bold;">&#40;</span>strtolower<span style="color:#006600; font-weight:bold;">&#40;</span>get_comment_author_email<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$gcachetime = <span style="color:#800000;color:#800000;">40320</span> * <span style="color:#800000;color:#800000;">60</span>; <span style="color:#FF9933; font-style:italic;">// 40320 = 4 Weeks</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$gimage = $gimagecachedir . <span style="color:#CC0000;">"/"</span> . $gravatar_hash . <span style="color:#CC0000;">".png"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">if <span style="color:#006600; font-weight:bold;">&#40;</span>!file_exists<span style="color:#006600; font-weight:bold;">&#40;</span>$gimage<span style="color:#006600; font-weight:bold;">&#41;</span> || <span style="color:#006600; font-weight:bold;">&#40;</span>time<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span> - $gcachetime&gt; filemtime<span style="color:#006600; font-weight:bold;">&#40;</span>$gimage<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; ob_start<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; $grav_img = <span style="color:#CC0000;">"http://www.gravatar.com/avatar/"</span> . $gravatar_hash . <span style="color:#CC0000;">"?s="</span> . $gimagesize . <span style="color:#CC0000;">"&amp;d="</span> . $mailnotfound . <span style="color:#CC0000;">"&amp;r=G"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; if<span style="color:#006600; font-weight:bold;">&#40;</span>extension_loaded<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">'curl'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; $gch = @curl_init<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; $gcurl_options = array<span style="color:#006600; font-weight:bold;">&#40;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CURLOPT_URL =&gt; $grav_img,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CURLOPT_HEADER =&gt; false,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CURLOPT_RETURNTRANSFER =&gt; true,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CURLOPT_TIMEOUT =&gt; <span style="color:#800000;color:#800000;">20</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CURLOPT_BINARYTRANSFER =&gt; is_resource<span style="color:#006600; font-weight:bold;">&#40;</span>$file<span style="color:#006600; font-weight:bold;">&#41;</span>,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CURLOPT_FOLLOWLOCATION =&gt; true,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CURLOPT_MAXREDIRS =&gt; <span style="color:#800000;color:#800000;">2</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; @curl_setopt_array<span style="color:#006600; font-weight:bold;">&#40;</span>$gch, $gcurl_options<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; $gdata = @curl_exec<span style="color:#006600; font-weight:bold;">&#40;</span>$gch<span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; @curl_close <span style="color:#006600; font-weight:bold;">&#40;</span>$gch<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; unset<span style="color:#006600; font-weight:bold;">&#40;</span>$gch<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span> else <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; ob_start<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; $gfilehandle_url = fopen<span style="color:#006600; font-weight:bold;">&#40;</span>$grav_img, <span style="color:#CC0000;">"rb"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; fpassthru<span style="color:#006600; font-weight:bold;">&#40;</span>$gfilehandle_url<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; fclose<span style="color:#006600; font-weight:bold;">&#40;</span>$gfilehandle_url<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; $gdata = ob_get_contents<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; ob_end_clean<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; unset<span style="color:#006600; font-weight:bold;">&#40;</span>$gfilehandle_url<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; $gfilehandle_img = fopen<span style="color:#006600; font-weight:bold;">&#40;</span>$gimage, <span style="color:#CC0000;">"wb+"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; fwrite<span style="color:#006600; font-weight:bold;">&#40;</span>$gfilehandle_img, $gdata<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; fclose<span style="color:#006600; font-weight:bold;">&#40;</span>$gfilehandle_img<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; unset<span style="color:#006600; font-weight:bold;">&#40;</span>$gfilehandle_img<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; unset<span style="color:#006600; font-weight:bold;">&#40;</span>$gdata<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">echo <span style="color:#CC0000;">"&lt;img src='"</span> . $gimageurldomain . $gravatar_hash . <span style="color:#CC0000;">".png' height='"</span> . $gimagesize . <span style="color:#CC0000;">"' width='"</span> . $gimagesize . <span style="color:#CC0000;">"'&gt;"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">?&gt; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
&#220;ber die Einstellungen im Kopf des Codes kann man nun das Cacheverzeichnis festlegen. Die darauffolgende URL ist die URL, so wie sie zum Bild zeigen w&#252;rde. Darunter befindet sich die Gr&#246;&#223;e.</p>
<p>Die konkreten &#196;nderungen gegen&#252;ber der Version des Blogs:</p>
<ul>
<li>&#220;bersetzung des Codes auf Englisch (sorry, ich steh da drauf)</li>
<li>Cleanup, Entfernung &#252;berfl&#252;ssiger Codest&#252;cke</li>
<li>Einbau von Curl als pr&#228;ferierte Downloadoption</li>
<li>Entfernung der Erstellung von HTML-Dateien, da dies nicht ben&#246;tigt wird</li>
</ul>
<p>Soweit so gut. Nun habe ich noch das CronJob-Script von <a href="http://infoblog.li/wordpress-gravatar-cache-mit-automatischer-aktualisierung/">diesem Blogeintrag auf infoblog.li</a> kurz aufger&#228;umt:</p>
<div class="igBar"><span id="lcode-18"><a href="#" onclick="javascript:showPlainTxt('code-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-18">
<div class="code">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&lt;?php </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Script originally from:</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// http://infoblog.li/wordpress-gravatar-cache-mit-automatischer-aktualisierung/</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">//</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Modified by Uli from http://wolf-u.li:</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// - Translation</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// - Cleanup</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// - Added curl</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Modify the settings below according to your needs:</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Path to the cache-directory of the gravatar images:</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$imagecachedir &nbsp;&nbsp;= <span style="color:#CC0000;">"blog/cdn-g/"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Size of the gravatar-images:</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$imagesize = <span style="color:#800000;color:#800000;">64</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Update files older than this time:</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$maxcacheage = <span style="color:#800000;color:#800000;">604800</span>; <span style="color:#FF9933; font-style:italic;">// 7 * 24 * 3600 = 7 Days</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// If the mailadress was not found, you can get various images:</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// - identicon</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// - monsterid</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// - wavatar</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$mailnotfound = <span style="color:#CC0000;">"identicon"</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#FF9933; font-style:italic;">// Do not modify the code below:</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$handle= opendir<span style="color:#006600; font-weight:bold;">&#40;</span>$imagecachedir<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">while <span style="color:#006600; font-weight:bold;">&#40;</span>$file = readdir <span style="color:#006600; font-weight:bold;">&#40;</span>$handle<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// Einzelne Pfade und Dateinamen auslesen</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; $gravatar_hash&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =&nbsp; &nbsp;substr<span style="color:#006600; font-weight:bold;">&#40;</span>$file, <span style="color:#800000;color:#800000;">0</span>, <span style="color:#800000;color:#800000;">32</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; $gravatarimg&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = &nbsp; $imagecachedir . $file ;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; if <span style="color:#006600; font-weight:bold;">&#40;</span>$gravatar_hash != <span style="color:#CC0000;">".."</span> &amp;&amp; $gravatar_hash != <span style="color:#CC0000;">"."</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#FF9933; font-style:italic;">// Update only if timestamp of the file is older than $maxcacheage</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; $cachedtime = filemtime<span style="color:#006600; font-weight:bold;">&#40;</span>$gravatarimg<span style="color:#006600; font-weight:bold;">&#41;</span> - time<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; if <span style="color:#006600; font-weight:bold;">&#40;</span>$cachedtime&gt; $maxcacheage<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $grav_img = <span style="color:#CC0000;">"http://www.gravatar.com/avatar/"</span>.$gravatar_hash.<span style="color:#CC0000;">"?s="</span> . $imagesize . <span style="color:#CC0000;">"&amp;d="</span> . $mailnotfound . <span style="color:#CC0000;">"&amp;r=G"</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if<span style="color:#006600; font-weight:bold;">&#40;</span>extension_loaded<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0000;">'curl'</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;$ch = @curl_init<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $curl_options = array<span style="color:#006600; font-weight:bold;">&#40;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CURLOPT_URL =&gt; $grav_img,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CURLOPT_HEADER =&gt; false,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CURLOPT_RETURNTRANSFER =&gt; true,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CURLOPT_TIMEOUT =&gt; <span style="color:#800000;color:#800000;">20</span>,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CURLOPT_BINARYTRANSFER =&gt; true,</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CURLOPT_FOLLOWLOCATION =&gt; true,</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CURLOPT_MAXREDIRS =&gt; <span style="color:#800000;color:#800000;">2</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @curl_setopt_array<span style="color:#006600; font-weight:bold;">&#40;</span>$ch, $curl_options<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; </div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $data = @curl_exec<span style="color:#006600; font-weight:bold;">&#40;</span>$ch<span style="color:#006600; font-weight:bold;">&#41;</span>;&nbsp; &nbsp; </div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; @curl_close <span style="color:#006600; font-weight:bold;">&#40;</span>$ch<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; unset<span style="color:#006600; font-weight:bold;">&#40;</span>$ch<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span> else <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;ob_start<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;$filehandle_url = fopen<span style="color:#006600; font-weight:bold;">&#40;</span>$grav_img, <span style="color:#CC0000;">"rb"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;fpassthru<span style="color:#006600; font-weight:bold;">&#40;</span>$filehandle_url<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;fclose<span style="color:#006600; font-weight:bold;">&#40;</span>$filehandle_url<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;$data = ob_get_contents<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;ob_end_clean<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp;unset<span style="color:#006600; font-weight:bold;">&#40;</span>$filehandle_url<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; $filehandle_img = fopen<span style="color:#006600; font-weight:bold;">&#40;</span>$gravatarimg, <span style="color:#CC0000;">"wb+"</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fwrite<span style="color:#006600; font-weight:bold;">&#40;</span>$filehandle_img, $data<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; fclose<span style="color:#006600; font-weight:bold;">&#40;</span>$filehandle_img<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; unset<span style="color:#006600; font-weight:bold;">&#40;</span>$filehandle_img<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; unset<span style="color:#006600; font-weight:bold;">&#40;</span>$data<span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">closedir<span style="color:#006600; font-weight:bold;">&#40;</span>$handle<span style="color:#006600; font-weight:bold;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Was macht dieses Script? Es aktualisiert alle 7 Tage die Gravatars, die bereits im Cache liegen. Auch dieses Script wurde auf curl umgestellt und ein bisschen aufger&#228;umt. Ich rate dazu, das Script wenigstens alle Stunde einmal ausf&#252;hren zu lassen, um die Anzahl der gleichzeitig zu aktualisierenden Gravatare so gering wie m&#246;glich zu halten. Dies kann entweder per lokalem CronJob, oder einem CronJob-Dienst aus dem Internet wie beispielsweise <a href="http://www.cronjob.de/">cronjob.de</a> ausgef&#252;hrt werden (<a href="http://infoblog.li/script-mit-hilfe-von-cronjob-de-automatisch-ausfuehren-lassen/">HowTo f&#252;r letzteren Fall</a>).</p>
<p>Meine letzten Hinweise zur Performance: Man sollte sich im klaren sein, dass bei gr&#246;&#223;eren Kommentaranzahlen (sagen wir mal 300) auch bei jedem Kommentar gepr&#252;ft wird, ob die Datei vorhanden ist (d.h. 300 Dateisystemaufrufe). Das kann definitiv bremsen.</p>
<p>Daher habe ich mir eine andere Methode der Auslieferung &#252;berlegt, welche ich in einem weiteren Artikel beschreiben werde.</p>
<hr /><small><center>&copy; 2005-2009 by <a href='http://wolf-u.li/'>Uli Wolf</a> - This Content is distributed under the <a href='http://wolf-u.li/pwnd-faq/'>Creative Commons License</a><br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites without attribution to the author and notification of the author breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:  d2a576b5311479d89eff39b7ca886f6b)</center></small>]]></content:encoded>
			<wfw:commentRss>http://wolf-u.li/3347/auslieferung-von-gravatar-icons-aus-einem-lokalen-cache-download-per-curl/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>wolf-u.li hat Pagerank 3 bekommen</title>
		<link>http://wolf-u.li/2892/wolf-uli-hat-pagerank-3-bekommen/?piwik_campaign=rss</link>
		<comments>http://wolf-u.li/2892/wolf-uli-hat-pagerank-3-bekommen/#comments</comments>
		<pubDate>Wed, 08 Apr 2009 21:27:46 +0000</pubDate>
		<dc:creator>Uli</dc:creator>
				<category><![CDATA[Gedankenwirbel]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Google]]></category>

		<guid isPermaLink="false">http://wolf-u.li/?p=2892</guid>
		<description><![CDATA[Wie ich gerade gesehen habe, hat mir das Pagerank-Update von diesem Monat einen Pluspunkt beschert. So hat sich also diese Seite 1111 Tage nach dem ersten Beitrag auf PR3 gesteigert   Bringt zwar erstmal nicht sooo arg viel, aber freut mich, dass Google mich mag  
&#169; 2005-2009 by Uli Wolf - This Content [...]]]></description>
			<content:encoded><![CDATA[<p>Wie ich gerade gesehen habe, hat mir das Pagerank-Update von diesem Monat einen Pluspunkt beschert. So hat sich also diese Seite 1111 Tage nach dem ersten Beitrag auf PR3 gesteigert <img src='http://wolf-u.li/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Bringt zwar erstmal nicht sooo arg viel, aber freut mich, dass Google mich mag <img src='http://wolf-u.li/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<hr /><small><center>&copy; 2005-2009 by <a href='http://wolf-u.li/'>Uli Wolf</a> - This Content is distributed under the <a href='http://wolf-u.li/pwnd-faq/'>Creative Commons License</a><br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites without attribution to the author and notification of the author breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:  d2a576b5311479d89eff39b7ca886f6b)</center></small>]]></content:encoded>
			<wfw:commentRss>http://wolf-u.li/2892/wolf-uli-hat-pagerank-3-bekommen/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Umstieg von Disclose-Secret und Role-Manager auf Role-Scoper</title>
		<link>http://wolf-u.li/2775/umstieg-von-disclose-secret-und-role-manager-auf-role-scoper/?piwik_campaign=rss</link>
		<comments>http://wolf-u.li/2775/umstieg-von-disclose-secret-und-role-manager-auf-role-scoper/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 17:07:56 +0000</pubDate>
		<dc:creator>Uli</dc:creator>
				<category><![CDATA[Infotech]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Plugin]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://wolf-u.li/?p=2775</guid>
		<description><![CDATA[Seit Ewigkeiten habe ich auf meiner Seite Disclose-Secret und Role-Manager zum Schutz privater Beitr&#228;ge in Betrieb gehabt. Leider funktioniert dieser nach Umstieg auf Wordpress 2.7 nur noch sehr eingeschr&#228;nkt, bei Bearbeitungen und neuen Beitr&#228;gen gar nicht mehr.
Auf der Suche nach einer Alternative stie&#223; ich auf das Plugin Role-Scoper, welches nach einigen Feature-Requests meinerseits nun problemlos [...]]]></description>
			<content:encoded><![CDATA[<p>Seit Ewigkeiten habe ich auf meiner Seite <a href="http://wordpress.org/extend/plugins/disclose-secret/">Disclose-Secret</a> und <a href="http://www.im-web-gefunden.de/wordpress-plugins/role-manager/">Role-Manager</a> zum Schutz privater Beitr&#228;ge in Betrieb gehabt. Leider funktioniert dieser nach Umstieg auf <a href="http://wolf-u.li/2196/wordpress-27-coltrane-ist-erschienen/">Wordpress 2.7</a> nur noch sehr eingeschr&#228;nkt, bei Bearbeitungen und neuen Beitr&#228;gen gar nicht mehr.<br />
Auf der Suche nach einer Alternative stie&#223; ich auf das Plugin <a href="http://agapetry.net/news/introducing-role-scoper/">Role-Scoper</a>, welches nach einigen Feature-Requests meinerseits nun problemlos eine Authentifizierung im RSS-Feed und eine Zuordnung von Beitr&#228;gen zu Gruppen unterst&#252;tzt.<br />
Neben meinem regul&#228;ren <a href="http://wolf-u.li/feed/">RSS-Feed</a> ist nun f&#252;r registrierte Leser mit den entsprechenden Gruppenzuweisungen auch ein gesonderter <a href="http://wolf-u.li/feed/?http_auth=1">Feed</a> verf&#252;gbar, in welchem ein paar Beitr&#228;ge zus&#228;tzlich verf&#252;gbar sind.<br />
Im Gegensatz zu Disclose Secret arbeitet das Plugin einwandfrei unter Wordpress 2.7 und integriert sich problemlos in die Oberfl&#228;che.</p>
<p>Der Autor ist an einer Weiterentwicklung interessiert und ver&#246;ffentlicht beispielsweise nach einem <a href="http://agapetry.net/forum/role-scoper/bug-in-scoped-user_anonphp/page-1/post-1156/">Bugreport</a> auch schnell neue <a href="http://agapetry.net/downloads/role-scoper_current">Versionen</a>.</p>
<hr /><small><center>&copy; 2005-2009 by <a href='http://wolf-u.li/'>Uli Wolf</a> - This Content is distributed under the <a href='http://wolf-u.li/pwnd-faq/'>Creative Commons License</a><br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites without attribution to the author and notification of the author breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:  d2a576b5311479d89eff39b7ca886f6b)</center></small>]]></content:encoded>
			<wfw:commentRss>http://wolf-u.li/2775/umstieg-von-disclose-secret-und-role-manager-auf-role-scoper/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sollen RSS-Feeds gek&#252;rzt oder ungek&#252;rzt erscheinen?</title>
		<link>http://wolf-u.li/2652/sollen-rss-feeds-gekuerzt-oder-ungekuerzt-erscheinen/?piwik_campaign=rss</link>
		<comments>http://wolf-u.li/2652/sollen-rss-feeds-gekuerzt-oder-ungekuerzt-erscheinen/#comments</comments>
		<pubDate>Thu, 26 Feb 2009 17:05:44 +0000</pubDate>
		<dc:creator>Uli</dc:creator>
				<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[Infotech]]></category>
		<category><![CDATA[Lifestyle]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://wolf-u.li/?p=2652</guid>
		<description><![CDATA[Inspiriert durch mehrere Beitr&#228;ge, zuletzt durch Andreas, aber auch durch Frank Bueltges und ein paar andere m&#246;chte ich mal erfahren, wie meine Leser den RSS-Feed gerne h&#228;tten.


Ungek&#252;rzt: Kompletter Beitrag im Feed
Gek&#252;rzt: So wie bisher nur ein Auszug im Feed

Der Poll bleibt eine Woche offen, mal schauen, was die Leser so meinen.
Die Leser haben entschieden, dass [...]]]></description>
			<content:encoded><![CDATA[<p>Inspiriert durch mehrere Beitr&#228;ge, zuletzt durch <a href="http://www.majeres.de/blogstockchen-nieder-mit-den-gekurzten-feeds">And</a><a href="http://www.majeres.de/gekrzte-feeds-rgernis-fr-den-stammleser">reas</a>, aber auch durch <a href="http://bueltge.de/short-feeds-es-stinkt-mir/896/">Frank Bueltges</a> und ein paar andere m&#246;chte ich mal erfahren, wie meine Leser den RSS-Feed gerne h&#228;tten.<br />
<a href="http://wolf-u.li/upload/2009/02/2652-auswertung.png"><img src="http://wolf-u.li/upload/2009/02/2652-auswertung.png" alt="2652-auswertung" title="2652-auswertung" width="400" height="173" class="alignnone size-full wp-image-2774" /></a></p>
<ul>
<li>Ungek&#252;rzt: Kompletter Beitrag im Feed</li>
<li>Gek&#252;rzt: So wie bisher nur ein Auszug im Feed</li>
</ul>
<p><del datetime="2009-03-14T19:45:08+00:00">Der Poll bleibt eine Woche offen, mal schauen, was die Leser so meinen.</del><br />
Die Leser haben entschieden, dass der Feed ungek&#252;rzt erscheint.</p>
<hr /><small><center>&copy; 2005-2009 by <a href='http://wolf-u.li/'>Uli Wolf</a> - This Content is distributed under the <a href='http://wolf-u.li/pwnd-faq/'>Creative Commons License</a><br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites without attribution to the author and notification of the author breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:  d2a576b5311479d89eff39b7ca886f6b)</center></small>]]></content:encoded>
			<wfw:commentRss>http://wolf-u.li/2652/sollen-rss-feeds-gekuerzt-oder-ungekuerzt-erscheinen/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Wordpress 2.7.1 ist erschienen</title>
		<link>http://wolf-u.li/2524/wordpress-271-ist-erschienen/?piwik_campaign=rss</link>
		<comments>http://wolf-u.li/2524/wordpress-271-ist-erschienen/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 21:20:40 +0000</pubDate>
		<dc:creator>Uli</dc:creator>
				<category><![CDATA[Gedankenwirbel]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://wolf-u.li/?p=2524</guid>
		<description><![CDATA[Soeben ist Wordpress 2.7.1 erschienen und bringt einige Fixes mit sich. Das Updatepaket f&#252;r die DE-Version wird sicher auch bald kommen. ist auch erschienen.
&#169; 2005-2009 by Uli Wolf - This Content is distributed under the Creative Commons License This feed is for personal, non-commercial use only.  The use of this feed on other websites [...]]]></description>
			<content:encoded><![CDATA[<p>Soeben ist Wordpress 2.7.1 erschienen und bringt einige <a href="http://trac.wordpress.org/query?status=closed&#038;milestone=2.7.1&#038;resolution=fixed&#038;order=priority">Fixes</a> mit sich. Das <a href="http://blog.wordpress-deutschland.org/2009/02/10/wordpress-271-veroeffentlicht.html">Updatepaket f&#252;r die DE-Version</a> <del datetime="2009-02-11T18:32:28+00:00">wird sicher auch bald kommen.</del> ist auch <a href="http://blog.wordpress-deutschland.org/2009/02/10/wordpress-271-de-edition-und-upgradepaket.html">erschienen</a>.</p>
<hr /><small><center>&copy; 2005-2009 by <a href='http://wolf-u.li/'>Uli Wolf</a> - This Content is distributed under the <a href='http://wolf-u.li/pwnd-faq/'>Creative Commons License</a><br /> This feed is for personal, non-commercial use only. <br /> The use of this feed on other websites without attribution to the author and notification of the author breaches copyright. If this content is not in your news reader, it makes the page you are viewing an infringement of the copyright. (Digital Fingerprint:  d2a576b5311479d89eff39b7ca886f6b)</center></small>]]></content:encoded>
			<wfw:commentRss>http://wolf-u.li/2524/wordpress-271-ist-erschienen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
