<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="/templates/default/atom.css" type="text/css" ?>

<feed 
   xmlns="http://www.w3.org/2005/Atom"
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/">
    <link href="http://blog.alphalogic.org/feeds/atom.xml" rel="self" title="Alpha's (aka Flo Solcher) Blog" type="application/atom+xml" />
    <link href="http://blog.alphalogic.org/"                        rel="alternate"    title="Alpha's (aka Flo Solcher) Blog" type="text/html" />
    <link href="http://blog.alphalogic.org/rss.php?version=2.0"     rel="alternate"    title="Alpha's (aka Flo Solcher) Blog" type="application/rss+xml" />
    <title type="html">Alpha's (aka Flo Solcher) Blog</title>
    <subtitle type="html">Ein Kreis im Chaos</subtitle>
    
    <id>http://blog.alphalogic.org/</id>
    <updated>2008-07-24T12:08:12Z</updated>
    <generator uri="http://www.s9y.org/" version="1.3.1">Serendipity 1.3.1 - http://www.s9y.org/</generator>
    <dc:language>de</dc:language>

    <entry>
        <link href="http://blog.alphalogic.org/archives/125-Trim-fuer-Javascript.html" rel="alternate" title="Trim für Javascript" />
        <author>
            <name>Alpha</name>
                    </author>
    
        <published>2008-07-24T12:08:12Z</published>
        <updated>2008-07-24T12:08:12Z</updated>
        <wfw:comment>http://blog.alphalogic.org/wfwcomment.php?cid=125</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.alphalogic.org/rss.php?version=atom1.0&amp;type=comments&amp;cid=125</wfw:commentRss>
    
    
        <id>http://blog.alphalogic.org/archives/125-guid.html</id>
        <title type="html">Trim für Javascript</title>
        <content type="xhtml" xml:base="http://blog.alphalogic.org/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <div class="javascript" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> trim <span style="color: #66cc66;">&#40;</span>zeichenkette<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066; font-weight: bold;">return</span> zeichenkette.<span style="color: #006600;">replace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066FF;">/^\s+/</span>, <span style="color: #3366CC;">''</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">replace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066FF;">/\s+$/</span>, <span style="color: #3366CC;">''</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div></li></ol></div> 
            </div>
        </content>
        <dc:subject>codeschnipsel</dc:subject>
<dc:subject>javascript</dc:subject>
<dc:subject>scripts</dc:subject>
<dc:subject>web</dc:subject>

    </entry>
    <entry>
        <link href="http://blog.alphalogic.org/archives/124-Impressionen-Berlin-1.html" rel="alternate" title="Impressionen Berlin #1" />
        <author>
            <name>Alpha</name>
                    </author>
    
        <published>2008-07-24T12:07:27Z</published>
        <updated>2008-07-24T12:07:27Z</updated>
        <wfw:comment>http://blog.alphalogic.org/wfwcomment.php?cid=124</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.alphalogic.org/rss.php?version=atom1.0&amp;type=comments&amp;cid=124</wfw:commentRss>
    
            <category scheme="http://blog.alphalogic.org/categories/2-Ausland" label="Ausland" term="Ausland" />
    
        <id>http://blog.alphalogic.org/archives/124-guid.html</id>
        <title type="html">Impressionen Berlin #1</title>
        <content type="xhtml" xml:base="http://blog.alphalogic.org/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <a   rel="lightbox" href="http://blog.alphalogic.org/uploads/Berlin_1.jpg"><img src="http://blog.alphalogic.org/uploads/Berlin_1.quickblog.jpg" /></a>
<br />
Schlesisches Tor

 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.alphalogic.org/archives/122-8-Wochen.html" rel="alternate" title="8 Wochen" />
        <author>
            <name>Alpha</name>
                    </author>
    
        <published>2008-06-09T05:02:19Z</published>
        <updated>2008-06-09T13:28:12Z</updated>
        <wfw:comment>http://blog.alphalogic.org/wfwcomment.php?cid=122</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.alphalogic.org/rss.php?version=atom1.0&amp;type=comments&amp;cid=122</wfw:commentRss>
    
            <category scheme="http://blog.alphalogic.org/categories/12-Itchy" label="Itchy" term="Itchy" />
    
        <id>http://blog.alphalogic.org/archives/122-guid.html</id>
        <title type="html">8 Wochen</title>
        <content type="xhtml" xml:base="http://blog.alphalogic.org/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <a   rel="lightbox" href="http://blog.alphalogic.org/uploads/ernie/itchy.jpg"><img src="http://blog.alphalogic.org/uploads/ernie/itchy.quickblog.jpg" /></a>
<br />
Ernie ist nun 8 Wochen alt und heißt nach erfolgter Geschlechtsfeststellung <br />Itchy <img src="http://blog.alphalogic.org/templates/alpha/img/emoticons/smile.png" alt=":-)" style="display: inline; vertical-align: bottom;" class="emoticon" />

 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.alphalogic.org/archives/123-Erster-Lauf-mit-Forerunner-305.html" rel="alternate" title="Erster Lauf mit Forerunner 305" />
        <author>
            <name>Alpha</name>
                    </author>
    
        <published>2008-06-08T11:03:00Z</published>
        <updated>2008-06-09T06:15:31Z</updated>
        <wfw:comment>http://blog.alphalogic.org/wfwcomment.php?cid=123</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.alphalogic.org/rss.php?version=atom1.0&amp;type=comments&amp;cid=123</wfw:commentRss>
    
            <category scheme="http://blog.alphalogic.org/categories/9-Sport" label="Sport" term="Sport" />
    
        <id>http://blog.alphalogic.org/archives/123-guid.html</id>
        <title type="html">Erster Lauf mit Forerunner 305</title>
        <content type="xhtml" xml:base="http://blog.alphalogic.org/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Habe eben mal meine neu erstandene Forerunner 305 mit einem <br />~10km+ Lauf an der Wertach eingelaufen.<br />

<iframe width="425" height="800" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&amp;hl=en&amp;q=http:%2F%2Fblog.alphalogic.org%2Fkml%2F08.06.08.kml&amp;ie=UTF8&amp;t=h&amp;ll=48.335052,10.859671&amp;spn=0.040521,0.02553&amp;output=embed&amp;s=AARTsJqcV6ybov1g7UG9Ko_3g8Zobeu6Pg"></iframe>
<div style="padding: 5px; border: 1px #DBDAD6 dotted; width: 413px">
Distance: 10km 378m<br />
Duration: 59min 14sec<br />
Avg. Speed 10.5km/h<br />
Calories: 763cal<br />
</div><br /><small><a href="http://blog.alphalogic.org/exit.php?url_id=528&amp;entry_id=123" title="http://maps.google.com/maps?f=q&amp;amp;hl=en&amp;amp;q=http:%2F%2Fblog.alphalogic.org%2Fkml%2F08.06.08.kml&amp;amp;ie=UTF8&amp;amp;t=h&amp;amp;ll=48.335052,10.859671&amp;amp;spn=0.040521,0.02553&amp;amp;source=embed"  onmouseover="window.status='http://maps.google.com/maps?f=q&amp;amp;hl=en&amp;amp;q=http:%2F%2Fblog.alphalogic.org%2Fkml%2F08.06.08.kml&amp;amp;ie=UTF8&amp;amp;t=h&amp;amp;ll=48.335052,10.859671&amp;amp;spn=0.040521,0.02553&amp;amp;source=embed';return true;" onmouseout="window.status='';return true;" style="color:#0000FF;text-align:left">View Larger Map</a></small> 
            </div>
        </content>
        <dc:subject>gps</dc:subject>
<dc:subject>laufen</dc:subject>
<dc:subject>map</dc:subject>
<dc:subject>sport</dc:subject>

    </entry>
    <entry>
        <link href="http://blog.alphalogic.org/archives/121-Neuer-Mitbewohner.html" rel="alternate" title="Neuer Mitbewohner" />
        <author>
            <name>Alpha</name>
                    </author>
    
        <published>2008-05-30T08:05:15Z</published>
        <updated>2008-06-09T13:28:26Z</updated>
        <wfw:comment>http://blog.alphalogic.org/wfwcomment.php?cid=121</wfw:comment>
    
        <slash:comments>1</slash:comments>
        <wfw:commentRss>http://blog.alphalogic.org/rss.php?version=atom1.0&amp;type=comments&amp;cid=121</wfw:commentRss>
    
            <category scheme="http://blog.alphalogic.org/categories/12-Itchy" label="Itchy" term="Itchy" />
    
        <id>http://blog.alphalogic.org/archives/121-guid.html</id>
        <title type="html">Neuer Mitbewohner</title>
        <content type="xhtml" xml:base="http://blog.alphalogic.org/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <a   rel="lightbox" href="http://blog.alphalogic.org/uploads/ernie/ernie_2.jpg"><img src="http://blog.alphalogic.org/uploads/ernie/ernie_2.quickblog.jpg" /></a>
<br />
Gestern kam mein neuer Mitbewohner an: Ernie<br />
Momentan ist er noch etwas unsicher auf den Beinen und noch nicht ganz mit der Umgebung vertraut - er unternimmt jedoch schon mutige Erkundigungen.

 
            </div>
        </content>
        
    </entry>
    <entry>
        <link href="http://blog.alphalogic.org/archives/118-Shell-Mysqldump-erstellen-und-einspielen.html" rel="alternate" title="Shell: Mysqldump erstellen und einspielen" />
        <author>
            <name>Alpha</name>
                    </author>
    
        <published>2008-03-18T07:54:04Z</published>
        <updated>2008-03-18T07:58:34Z</updated>
        <wfw:comment>http://blog.alphalogic.org/wfwcomment.php?cid=118</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.alphalogic.org/rss.php?version=atom1.0&amp;type=comments&amp;cid=118</wfw:commentRss>
    
    
        <id>http://blog.alphalogic.org/archives/118-guid.html</id>
        <title type="html">Shell: Mysqldump erstellen und einspielen</title>
        <content type="xhtml" xml:base="http://blog.alphalogic.org/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Sehr simpel, aber man muss sich ja nicht alles merken

Dump erstellen
<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">mysqldump --opt -u username -p db_name | gzip &gt; backup_file_name.sql.gz </div></li></ol></div>

Dump einspielen
<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">mysql -u username -p db_name &lt; backup_file_name.sql </div></li></ol></div>
bzw
<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">gunzip &lt; backup_file_name.sql.gz | mysql -u username -p db_name </div></li></ol></div> 
            </div>
        </content>
        <dc:subject>linux</dc:subject>
<dc:subject>server</dc:subject>
<dc:subject>shell</dc:subject>
<dc:subject>sql</dc:subject>

    </entry>
    <entry>
        <link href="http://blog.alphalogic.org/archives/117-Ilkka-Remes-Die-Geiseln.html" rel="alternate" title="Ilkka Remes: Die Geiseln" />
        <author>
            <name>Alpha</name>
                    </author>
    
        <published>2008-03-04T11:12:39Z</published>
        <updated>2008-03-04T11:20:30Z</updated>
        <wfw:comment>http://blog.alphalogic.org/wfwcomment.php?cid=117</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.alphalogic.org/rss.php?version=atom1.0&amp;type=comments&amp;cid=117</wfw:commentRss>
    
    
        <id>http://blog.alphalogic.org/archives/117-guid.html</id>
        <title type="html">Ilkka Remes: Die Geiseln</title>
        <content type="xhtml" xml:base="http://blog.alphalogic.org/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <table class="amazontableleft"><tr><td align="center" valign="top" rowspan="1"><a href=""><img class='serendipity_amazonchr_pic' src='http://ecx.images-amazon.com/images/I/21uYuZv03zL.jpg' alt='Die Geiseln' /></a></td><td valign="top"> <div class="serendipity_amazonchr_title"><a href="">Die Geiseln</a></div><div class="serendipity_amazonchr_catalog"></div><div class="serendipity_amazonchr_extra">Autoren: Ilkka Remes, Stefan Moster<br />
Verlag: Dtv<br />
Erschienen: 2007-12-01<br />
Seiten: 464<br />
ISBN: 3423246383<br />
</div></td></tr></table>Die Geiseln<ul><li>ist ein unterhaltsamer Roman<li> lässt sich in einem Fluss lesen<li>beweist, dass Ilkka Remes viel Phantasie hat<li>ist genretypisch flach wie ein Brett</ul><br /><b>Fazit:</b> lesenswert 
            </div>
        </content>
        <dc:subject>buch</dc:subject>
<dc:subject>gelesen</dc:subject>
<dc:subject>kritik</dc:subject>

    </entry>
    <entry>
        <link href="http://blog.alphalogic.org/archives/116-There-will-be-blood.html" rel="alternate" title="There will be blood" />
        <author>
            <name>Alpha</name>
                    </author>
    
        <published>2008-03-01T16:03:26Z</published>
        <updated>2008-03-04T11:22:33Z</updated>
        <wfw:comment>http://blog.alphalogic.org/wfwcomment.php?cid=116</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.alphalogic.org/rss.php?version=atom1.0&amp;type=comments&amp;cid=116</wfw:commentRss>
    
    
        <id>http://blog.alphalogic.org/archives/116-guid.html</id>
        <title type="html">There will be blood</title>
        <content type="xhtml" xml:base="http://blog.alphalogic.org/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <a  class='serendipity_image_link'  rel='lightbox' href='http://blog.alphalogic.org/uploads/kino/there_will_be_blood.jpg'><!-- s9ymdb:86 --><img width="77" height="110" style="float: left; border: 0px; padding-left: 5px; padding-right: 5px;" src="http://blog.alphalogic.org/uploads/kino/there_will_be_blood.serendipityThumb.jpg" alt=""  /></a>There will be blood ist<ul><li>eine  ausgezeichnete Literaturverfilmung</li><li>ein Film der Geduld fordert</li><li>nichts für den Mainstream</li><li>ein Streifen in dem Daniel Day Lewis brilliert</li></ul><br /><b>Fazit:</b> sehenswert 
            </div>
        </content>
        <dc:subject>film</dc:subject>
<dc:subject>kino</dc:subject>
<dc:subject>kritik</dc:subject>

    </entry>
    <entry>
        <link href="http://blog.alphalogic.org/archives/115-Helden-der-Nacht-....html" rel="alternate" title="Helden der Nacht ..." />
        <author>
            <name>Alpha</name>
                    </author>
    
        <published>2008-02-27T10:41:47Z</published>
        <updated>2008-02-27T10:50:12Z</updated>
        <wfw:comment>http://blog.alphalogic.org/wfwcomment.php?cid=115</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.alphalogic.org/rss.php?version=atom1.0&amp;type=comments&amp;cid=115</wfw:commentRss>
    
    
        <id>http://blog.alphalogic.org/archives/115-guid.html</id>
        <title type="html">Helden der Nacht ...</title>
        <content type="xhtml" xml:base="http://blog.alphalogic.org/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <a  class='serendipity_image_link'  rel='lightbox' href='http://blog.alphalogic.org/uploads/kino/WeOwntheNight_Poster01.jpg'><!-- s9ymdb:85 --><img width="73" height="110" style="float: left; border: 0px; padding-left: 5px; padding-right: 5px;" src="http://blog.alphalogic.org/uploads/kino/WeOwntheNight_Poster01.serendipityThumb.jpg" alt=""  /></a>... ist ein ganz netter Film, in dem <br />- es um Drogen, Liebe, Schicksal und Gewalt geht<br />- Joaquin Phoenix gut spielt<br />- Eva Mendes hübsch ist <br />- teilweise tolle Kameraeinstellungen, Musik und Schnitte verwendet wurden<br />- man  zuviel Pathos ins Ende legte 
            </div>
        </content>
        <dc:subject>film</dc:subject>
<dc:subject>kino</dc:subject>

    </entry>
    <entry>
        <link href="http://blog.alphalogic.org/archives/114-MySQL-Tabellen-optimieren-per-Cronjob-und-PHP-CLI-mit-PDO.html" rel="alternate" title="MySQL Tabellen optimieren per Cronjob und PHP CLI (mit PDO)" />
        <author>
            <name>Alpha</name>
                    </author>
    
        <published>2008-02-22T10:09:11Z</published>
        <updated>2008-02-22T12:19:48Z</updated>
        <wfw:comment>http://blog.alphalogic.org/wfwcomment.php?cid=114</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.alphalogic.org/rss.php?version=atom1.0&amp;type=comments&amp;cid=114</wfw:commentRss>
    
    
        <id>http://blog.alphalogic.org/archives/114-guid.html</id>
        <title type="html">MySQL Tabellen optimieren per Cronjob und PHP CLI (mit PDO)</title>
        <content type="xhtml" xml:base="http://blog.alphalogic.org/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Cronjob Skript erstellen
<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">vi /etc/cron.daily/optimize-tables </div></li></ol></div>
Folgendes anpassen und einfügen
<div class="php" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">#!/usr/bin/php </span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$host</span>&#160; &#160; &#160; &#160;= <span style="color: #ff0000;">'localhost'</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$user</span>&#160; &#160; &#160; &#160;= <span style="color: #ff0000;">'user'</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$password</span>&#160; &#160;= <span style="color: #ff0000;">'passwort'</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$gain</span>&#160; &#160; &#160; &#160;= <span style="color: #0000ff;">$total_gain</span> = <span style="color: #0000ff;">$total</span> = <span style="color: #cc66cc;">0</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$verbose</span>&#160; &#160; = <span style="color: #000000; font-weight: bold;">true</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">try <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #0000ff;">$pdo</span> = <span style="color: #000000; font-weight: bold;">new</span> PDO<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'mysql:host='</span> . <span style="color: #0000ff;">$host</span>, <span style="color: #0000ff;">$user</span>, <span style="color: #0000ff;">$password</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #808080; font-style: italic;">//Datenbanken ermitteln</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #0000ff;">$data_base_query</span> = <span style="color: #0000ff;">$pdo</span>-&gt;<span style="color: #006600;">prepare</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'SHOW DATABASES'</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #0000ff;">$data_base_query</span>-&gt;<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$data_base_query</span>-&gt;<span style="color: #006600;">fetchAll</span><span style="color: #66cc66;">&#40;</span>PDO::<span style="color: #006600;">FETCH_OBJ</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$data_base_obj</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <span style="color: #0000ff;">$data_base</span> = <span style="color: #0000ff;">$data_base_obj</span>-&gt;<span style="color: #006600;">Database</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$verbose</span><span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'Aktuelle Datenbank: '</span> . <span style="color: #0000ff;">$data_base</span> . PHP_EOL;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <span style="color: #0000ff;">$pdo</span>-&gt;<span style="color: #006600;">exec</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'USE '</span> . <span style="color: #0000ff;">$data_base</span><span style="color: #66cc66;">&#41;</span>;&#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <span style="color: #808080; font-style: italic;">//Tabellen ermitteln&#160; &#160; </span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <span style="color: #0000ff;">$table_query</span> = <span style="color: #0000ff;">$pdo</span>-&gt;<span style="color: #006600;">prepare</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'SHOW TABLE STATUS'</span><span style="color: #66cc66;">&#41;</span>;&#160; &#160; &#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/is_object"><span style="color: #000066;">is_object</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$table_query</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #0000ff;">$table_query</span>-&gt;<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #b1b100;">foreach</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$table_query</span>-&gt;<span style="color: #006600;">fetchAll</span><span style="color: #66cc66;">&#40;</span>PDO::<span style="color: #006600;">FETCH_OBJ</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">as</span> <span style="color: #0000ff;">$table</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #0000ff;">$total</span>&#160; &#160; &#160; &#160; &#160; = <a href="http://www.php.net/round"><span style="color: #000066;">round</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$table</span>-&gt;<span style="color: #006600;">Data_length</span> + <span style="color: #0000ff;">$table</span>-&gt;<span style="color: #006600;">Index_length</span><span style="color: #66cc66;">&#41;</span> / <span style="color: #cc66cc;">1024</span>, <span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #0000ff;">$gain</span>&#160; &#160; &#160; &#160; &#160; &#160;= <span style="color: #0000ff;">$table</span>-&gt;<span style="color: #006600;">Data_free</span> / <span style="color: #cc66cc;">1024</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #0000ff;">$total_gain</span>&#160; &#160; &#160;+= <span style="color: #0000ff;">$gain</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #0000ff;">$gain</span>&#160; &#160; &#160; &#160; &#160; &#160;= <a href="http://www.php.net/round"><span style="color: #000066;">round</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$gain</span>, <span style="color: #cc66cc;">3</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$verbose</span><span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'Optimiere Tabelle: '</span> . <span style="color: #0000ff;">$table</span>-&gt;<span style="color: #006600;">Name</span> . <span style="color: #ff0000;">'(Groesse: '</span> . <span style="color: #0000ff;">$total</span> . <span style="color: #ff0000;">' KB, Ueberhang: '</span> . <span style="color: #0000ff;">$gain</span> . <span style="color: #ff0000;">'KB)'</span> . PHP_EOL;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #0000ff;">$optimize_query</span> = <span style="color: #0000ff;">$pdo</span>-&gt;<span style="color: #006600;">prepare</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'OPTIMIZE TABLE '</span> . <span style="color: #0000ff;">$table</span>-&gt;<span style="color: #006600;">Name</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/is_object"><span style="color: #000066;">is_object</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$optimize_query</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #0000ff;">$optimize_query</span>-&gt;<span style="color: #006600;">execute</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$verbose</span><span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'Tabelle: '</span> . <span style="color: #0000ff;">$table</span>-&gt;<span style="color: #006600;">Name</span> . <span style="color: #ff0000;">' konnte nicht optimiert werden'</span> . PHP_EOL;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #66cc66;">&#125;</span>&#160; &#160; &#160; &#160; &#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$verbose</span><span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'Konnte die Tabellen von '</span> . <span style="color: #0000ff;">$data_base</span> . <span style="color: #ff0000;">' nicht ermitteln. '</span> . PHP_EOL;&#160; &#160; &#160; &#160; &#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$verbose</span><span style="color: #66cc66;">&#41;</span>&#160; &#160; &#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> PHP_EOL;&#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$verbose</span><span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> PHP_EOL;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$verbose</span><span style="color: #66cc66;">&#41;</span>&#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #ff0000;">'Insgesamter Ueberhang: '</span> . <span style="color: #0000ff;">$total_gain</span> . <span style="color: #ff0000;">'KB'</span> . PHP_EOL; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> catch <span style="color: #66cc66;">&#40;</span>PDOException <span style="color: #0000ff;">$e</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$verbose</span><span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <a href="http://www.php.net/echo"><span style="color: #000066;">echo</span></a> <span style="color: #0000ff;">$e</span>-&gt;<span style="color: #006600;">getMessage</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">?&gt;</span> </div></li></ol></div>
ausführbar machen
<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">chmod +x /etc/cron.daily/optimize-tables </div></li></ol></div>
 
            </div>
        </content>
        <dc:subject>mysql</dc:subject>
<dc:subject>php</dc:subject>
<dc:subject>scripts</dc:subject>
<dc:subject>server</dc:subject>

    </entry>
    <entry>
        <link href="http://blog.alphalogic.org/archives/113-Spamschutz-per-Greylist-mit-Plesk-8.x-und-Ubuntu.html" rel="alternate" title="Spamschutz per Greylist mit Plesk 8.x und Ubuntu " />
        <author>
            <name>Alpha</name>
                    </author>
    
        <published>2008-02-22T08:08:06Z</published>
        <updated>2008-02-22T08:25:12Z</updated>
        <wfw:comment>http://blog.alphalogic.org/wfwcomment.php?cid=113</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.alphalogic.org/rss.php?version=atom1.0&amp;type=comments&amp;cid=113</wfw:commentRss>
    
    
        <id>http://blog.alphalogic.org/archives/113-guid.html</id>
        <title type="html">Spamschutz per Greylist mit Plesk 8.x und Ubuntu </title>
        <content type="xhtml" xml:base="http://blog.alphalogic.org/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Die Installation ist abgesehen von den Paketen eigentlich analog zu <a href="huschi.net/5_125_de.html">Plesk &amp; Qmail: Spamprotection mit Greylisting - huschi.net</a><br />
<br />
Notwendige Pakete installieren:
<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">apt-get install libmysqlclient12-dev libssl-dev gcc </div></li></ol></div>
Datenbank erstellen
<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">mysql -u admin -p </div></li></ol></div>
<div class="sql" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># Datenbank 'qmail':</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">DATABASE</span> qmail;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># User 'greylist' (ändert evtl. das Passwort):</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">GRANT</span> <span style="color: #993333; font-weight: bold;">ALL</span> <span style="color: #993333; font-weight: bold;">ON</span> qmail.* <span style="color: #993333; font-weight: bold;">TO</span> <span style="color: #ff0000;">'greylist'</span>@<span style="color: #ff0000;">'localhost'</span> <span style="color: #993333; font-weight: bold;">IDENTIFIED</span> <span style="color: #993333; font-weight: bold;">BY</span> <span style="color: #ff0000;">'passwort'</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">FLUSH</span> PRIVILEGES;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># Tabelle 'relaytofrom':</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">USE</span> qmail;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333; font-weight: bold;">CREATE</span> <span style="color: #993333; font-weight: bold;">TABLE</span> relaytofrom <span style="color: #66cc66;">&#40;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; id bigint<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">AUTO_INCREMENT</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; relay_ip varchar<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">16</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; mail_from varchar<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; rcpt_to varchar<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #993333; font-weight: bold;">NULL</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; block_expires datetime <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; record_expires datetime <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; blocked_count bigint<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0'</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; passed_count bigint<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0'</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; aborted_count bigint<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0'</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; origin_type enum<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'MANUAL'</span>,<span style="color: #ff0000;">'AUTO'</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'MANUAL'</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; create_time datetime <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span> <span style="color: #993333; font-weight: bold;">DEFAULT</span> <span style="color: #ff0000;">'0000-00-00 00:00:00'</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; last_update timestamp<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">14</span><span style="color: #66cc66;">&#41;</span> <span style="color: #993333; font-weight: bold;">NOT</span> <span style="color: #993333; font-weight: bold;">NULL</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; <span style="color: #993333; font-weight: bold;">PRIMARY</span> <span style="color: #993333; font-weight: bold;">KEY</span>&#160; <span style="color: #66cc66;">&#40;</span>id<span style="color: #66cc66;">&#41;</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; <span style="color: #993333; font-weight: bold;">KEY</span> relay_ip <span style="color: #66cc66;">&#40;</span>relay_ip<span style="color: #66cc66;">&#41;</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; <span style="color: #993333; font-weight: bold;">KEY</span> mail_from <span style="color: #66cc66;">&#40;</span>mail_from<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; <span style="color: #993333; font-weight: bold;">KEY</span> rcpt_to <span style="color: #66cc66;">&#40;</span>rcpt_to<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#41;</span> TYPE=MyISAM; </div></li></ol></div>

<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066;">cd</span> /usr/<span style="color: #000066;">local</span>/src/</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">wget http://www.huschi.net/download/qmail-<span style="color: #cc66cc;">103</span>-greylist-psa8.tar.gz</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">#auspacken</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">tar xfz qmail-<span style="color: #cc66cc;">1</span>*</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066;">cd</span> qmail-<span style="color: #cc66cc;">1</span>.<span style="color: #cc66cc;">03</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">#bei Plesk 8 fehlt leider eine Datei:</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066;">echo</span> <span style="color: #ff0000;">"-lssl -lcrypto"</span> &gt;ssl.lib</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">vi local_scan.c </div></li></ol></div>

Datenbankeinstellungen anpassen:
<div class="c" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #339933;">#define MYSQLHOST &quot;localhost&quot;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #339933;">#define MYSQLUSER &quot;greylist&quot;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #339933;">#define MYSQLPASS &quot;passwort&quot;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #339933;">#define MYSQLDB&#160; &#160;&quot;qmail&quot;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #339933;">#define BLOCK_EXPIRE&#160; 4&#160; &#160;/* minutes until email is accepted */</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #339933;">#define RECORD_EXPIRE 1500&#160; /* minutes until record expires */</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #339933;">#define RECORD_EXPIRE_GOOD&#160; 36 /* days until record expires after accepting email */ </span></div></li></ol></div>

<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">vi Makefile </div></li></ol></div>
Ersetzte alle Vorkommen von "/usr/lib/mysql/libmysqlclient.a" durch "/usr/lib/libmysqlclient.a"

<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">vi tls.c </div></li></ol></div>

Folgende Zeile auskommentieren (mit  // oder in /* ... */)
<div class="c" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #993333;">const</span> <span style="color: #993333;">char</span> *strerror<span style="color: #66cc66;">&#40;</span><span style="color: #993333;">int</span><span style="color: #66cc66;">&#41;</span>;&#160; </div></li></ol></div>

Installieren
<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">make</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># Email-Empfang stoppen:</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/etc/init.d/inetd stop</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">#(Qmail selbst muß nicht beendet werden.)</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># installieren:</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cp -p /var/qmail/bin/qmail-smtpd /var/qmail/bin/qmail-smtpd.old</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cp qmail-envelope-scanner /var/qmail/bin/.</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">chown root.qmail /var/qmail/bin/qmail-envelope-scanner</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">cp -pf qmail-smtpd /var/qmail/bin/.</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">chown root.qmail /var/qmail/bin/qmail-smtpd</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;"># qmail wieder starten:</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/etc/init.d/inetd start </div></li></ol></div>

Aufräum Skrip
<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">vi /etc/cron.daily/qmail-greylist-cleanup.pl </div></li></ol></div>

Folgendes einfügen (und anpassen):
<div class="perl" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #808080; font-style: italic;">#!/usr/bin/perl -w</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">use</span> strict;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">use</span> constant DBD =&gt; <span style="color: #ff0000;">'DBI:mysql:qmail:localhost:3306'</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">use</span> constant DBUSER =&gt; <span style="color: #ff0000;">'greylist'</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">use</span> constant DBPASS =&gt; <span style="color: #ff0000;">'passwort'</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">use</span> DBI;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><a href="http://www.perldoc.com/perl5.6/pod/func/system.html"><span style="color: #000066;">system</span></a> <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'cat /dev/null &gt; /tmp/greylist_dbg.txt'</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$dbh</span> = DBI-&gt;<span style="color: #006600;">connect</span><span style="color: #66cc66;">&#40;</span>DBD,DBUSER,DBPASS<span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">or</span> <a href="http://www.perldoc.com/perl5.6/pod/func/die.html"><span style="color: #000066;">die</span></a> <span style="color: #ff0000;">"can't connect to db "</span>, <span style="color: #0000ff;">$DBI</span>::<span style="color: #006600;">errstr</span>, <span style="color: #ff0000;">":$!"</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$dbh</span>-&gt;<span style="color: #006600;">do</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"DELETE FROM relaytofrom WHERE record_expires &lt; NOW() - INTERVAL 1 HOUR AND origin_type = 'AUTO'"</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$dbh</span>-&gt;<span style="color: #006600;">do</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"OPTIMIZE TABLE relaytofrom"</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">$dbh</span>-&gt;<span style="color: #006600;">disconnect</span>; </div></li></ol></div>

Ausführbar machen
<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">chmod +x /etc/cron.daily/qmail-greylist-cleanup.pl </div></li></ol></div>
 
            </div>
        </content>
        <dc:subject>plesk</dc:subject>
<dc:subject>qmail</dc:subject>
<dc:subject>server</dc:subject>
<dc:subject>spam</dc:subject>
<dc:subject>ubuntu</dc:subject>

    </entry>
    <entry>
        <link href="http://blog.alphalogic.org/archives/111-Mit-Javascript-Bild-wechseln-und-cachen-OHNE-Blitzer.html" rel="alternate" title="Mit Javascript Bild wechseln und cachen OHNE Blitzer" />
        <author>
            <name>Alpha</name>
                    </author>
    
        <published>2008-02-21T10:00:36Z</published>
        <updated>2008-02-22T13:55:49Z</updated>
        <wfw:comment>http://blog.alphalogic.org/wfwcomment.php?cid=111</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.alphalogic.org/rss.php?version=atom1.0&amp;type=comments&amp;cid=111</wfw:commentRss>
    
    
        <id>http://blog.alphalogic.org/archives/111-guid.html</id>
        <title type="html">Mit Javascript Bild wechseln und cachen OHNE Blitzer</title>
        <content type="xhtml" xml:base="http://blog.alphalogic.org/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                Für folgendes wird Mootools (<a href="http://blog.alphalogic.org/exit.php?url_id=455&amp;entry_id=111" title="http://mootools.net"  onmouseover="window.status='http://mootools.net';return true;" onmouseout="window.status='';return true;">http://mootools.net</a>) benötigt, das ich eigentlich standardmässig verwende.
<div class="javascript" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> loaded&#160; &#160; &#160; = <span style="color: #003366; font-weight: bold;">new</span> Array<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> in_array<span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">item</span>,arr<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #000066; font-weight: bold;">for</span><span style="color: #66cc66;">&#40;</span>p=<span style="color: #CC0000;">0</span>;p&lt;arr.<span style="color: #006600;">length</span>;p++<span style="color: #66cc66;">&#41;</span> <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000066; font-weight: bold;">item</span> == arr<span style="color: #66cc66;">&#91;</span>p<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">true</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">false</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span>&#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> switch_bg_image<span style="color: #66cc66;">&#40;</span>where, what<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>!in_array<span style="color: #66cc66;">&#40;</span>what, loaded<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; temp = <span style="color: #003366; font-weight: bold;">new</span> Image<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; temp.<span style="color: #006600;">src</span> = what;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; temp.<span style="color: #000066;">onload</span> = <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; window.<span style="color: #006600;">addEvent</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'domready'</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; $<span style="color: #66cc66;">&#40;</span>where<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'background-image'</span>, </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #3366CC;">"url("</span> + temp.<span style="color: #006600;">src</span> + <span style="color: #3366CC;">")"</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; loaded<span style="color: #66cc66;">&#91;</span>loaded.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#93;</span> = what;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;&#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <span style="color: #66cc66;">&#125;</span>&#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #66cc66;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; window.<span style="color: #006600;">addEvent</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'domready'</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; $<span style="color: #66cc66;">&#40;</span>where<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'background-image'</span>, </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #3366CC;">"url("</span> + what + <span style="color: #3366CC;">")"</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;&#160; &#160; &#160; &#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #66cc66;">&#125;</span>&#160; &#160; &#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> switch_image<span style="color: #66cc66;">&#40;</span>where, what<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #000066; font-weight: bold;">if</span> <span style="color: #66cc66;">&#40;</span>!in_array<span style="color: #66cc66;">&#40;</span>what, loaded<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; temp = <span style="color: #003366; font-weight: bold;">new</span> Image<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; temp.<span style="color: #006600;">src</span> = what;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; temp.<span style="color: #000066;">onload</span> = <span style="color: #003366; font-weight: bold;">function</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; window.<span style="color: #006600;">addEvent</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'domready'</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; $<span style="color: #66cc66;">&#40;</span>where<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">src</span> = temp.<span style="color: #006600;">src</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; loaded<span style="color: #66cc66;">&#91;</span>loaded.<span style="color: #006600;">length</span><span style="color: #66cc66;">&#93;</span> = what;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;&#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <span style="color: #66cc66;">&#125;</span>&#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #66cc66;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; window.<span style="color: #006600;">addEvent</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">'domready'</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; $<span style="color: #66cc66;">&#40;</span>where<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">src</span> = what;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;&#160; &#160; &#160; &#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #66cc66;">&#125;</span>&#160; &#160; &#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div></li></ol></div>
 
            </div>
        </content>
        <dc:subject>codeschnipsel</dc:subject>
<dc:subject>javascript</dc:subject>
<dc:subject>mootools</dc:subject>
<dc:subject>web</dc:subject>

    </entry>
    <entry>
        <link href="http://blog.alphalogic.org/archives/110-Simpler-Klassen-Autoload-mit-SPL.html" rel="alternate" title="Simpler Klassen Autoload mit SPL" />
        <author>
            <name>Alpha</name>
                    </author>
    
        <published>2008-02-21T06:14:27Z</published>
        <updated>2008-02-21T06:16:52Z</updated>
        <wfw:comment>http://blog.alphalogic.org/wfwcomment.php?cid=110</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.alphalogic.org/rss.php?version=atom1.0&amp;type=comments&amp;cid=110</wfw:commentRss>
    
    
        <id>http://blog.alphalogic.org/archives/110-guid.html</id>
        <title type="html">Simpler Klassen Autoload mit SPL</title>
        <content type="xhtml" xml:base="http://blog.alphalogic.org/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <div class="php" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> mein_autoload<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$class_name</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/is_file"><span style="color: #000066;">is_file</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'class/'</span> . <span style="color: #0000ff;">$class_name</span> . <span style="color: #ff0000;">'.class.php'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <span style="color: #b1b100;">require_once</span> <span style="color: #ff0000;">'class/'</span> . <span style="color: #0000ff;">$class_name</span> . <span style="color: #ff0000;">'.class.php'</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; throw <span style="color: #000000; font-weight: bold;">new</span> Exception<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Konnte die Klasse <span style="color: #000099; font-weight: bold;">\'</span>'</span> . </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; <span style="color: #0000ff;">$class_name</span> . <span style="color: #ff0000;">'.class.php'</span> . <span style="color: #ff0000;">'<span style="color: #000099; font-weight: bold;">\'</span> nicht öffnen'</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">spl_autoload_register<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'mein_autoload'</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">?&gt;</span> </div></li></ol></div> 
            </div>
        </content>
        <dc:subject>codeschnipsel</dc:subject>
<dc:subject>php</dc:subject>
<dc:subject>scripts</dc:subject>
<dc:subject>web</dc:subject>

    </entry>
    <entry>
        <link href="http://blog.alphalogic.org/archives/109-Qmail-analysieren-Statistik-erzeugen.html" rel="alternate" title="Qmail analysieren - Statistik erzeugen" />
        <author>
            <name>Alpha</name>
                    </author>
    
        <published>2008-02-20T15:12:24Z</published>
        <updated>2008-02-20T18:44:10Z</updated>
        <wfw:comment>http://blog.alphalogic.org/wfwcomment.php?cid=109</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.alphalogic.org/rss.php?version=atom1.0&amp;type=comments&amp;cid=109</wfw:commentRss>
    
    
        <id>http://blog.alphalogic.org/archives/109-guid.html</id>
        <title type="html">Qmail analysieren - Statistik erzeugen</title>
        <content type="xhtml" xml:base="http://blog.alphalogic.org/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                qmailanalog source installieren:
<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">apt-get install qmailanalog-installer</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066;">cd</span> /usr/src/qmailanalog-installer</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">tar zxvf qmailanalog_<span style="color: #cc66cc;">0</span>.<span style="color: #cc66cc;">70</span>.orig.tar.gz</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066;">cd</span> qmailanalog-<span style="color: #cc66cc;">0</span>.<span style="color: #cc66cc;">70</span> </div></li></ol></div>

anpassen:
<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">vi error.h </div></li></ol></div>
<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">extern int errno; <span style="color: #808080; font-style: italic;"># bei dieser Zeile extern entfernen </span></div></li></ol></div>

kompilieren
<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">make</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">make setup check </div></li></ol></div>

cronskript erstellen
<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">vi /etc/cron.daily/qmailstats </div></li></ol></div>

der Inhalt:
<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">PATH=</span>/usr/<span style="color: #000066;">local</span>/qmailanalog/bin:/var/qmail/bin:<span style="color: #0000ff;">$PATH</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">MAILLOG=</span><span style="color: #ff0000;">"/var/log/mail.info"</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #0000ff;">QMAILLOG=</span><span style="color: #ff0000;">"/tmp/qmail.$$"</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/usr/bin/awk <span style="color: #ff0000;">'{$1=&quot;&quot;;$2=&quot;&quot;;$3=&quot;&quot;;$4=&quot;&quot;;$5=&quot;&quot;;print}'</span> &lt; <span style="color: #0000ff;">$MAILLOG</span> | matchup &gt; <span style="color: #0000ff;">$QMAILLOG</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#40;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066;">echo</span> <span style="color: #ff0000;">"To: meinemail@meinedomain.tld"</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066;">echo</span> <span style="color: #ff0000;">"From: servermail@meinedomain.tld"</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066;">echo</span> <span style="color: #ff0000;">"Subject: Mail Statistiken"</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000066;">echo</span> <span style="color: #ff0000;">""</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">zoverall &lt; <span style="color: #0000ff;">$QMAILLOG</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">zfailures &lt; <span style="color: #0000ff;">$QMAILLOG</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">zdeferrals &lt; <span style="color: #0000ff;">$QMAILLOG</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">recipients &lt; <span style="color: #0000ff;">$QMAILLOG</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">senders &lt; <span style="color: #0000ff;">$QMAILLOG</span><span style="color: #66cc66;">&#41;</span> | qmail-inject -f servermail@meinedomain.tld</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">rm -f <span style="color: #0000ff;">$QMAILLOG</span> </div></li></ol></div>

ausführbar machen:
<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">chmod +x /etc/cron.daily/qmailstats </div></li></ol></div>

testen:
<div class="bash" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">/etc/cron.daily/qmailstats </div></li></ol></div>

Original von <a href="http://blog.alphalogic.org/exit.php?url_id=450&amp;entry_id=109" title="http://www.megalinux.net/2005/01/qmail-statistic.html"  onmouseover="window.status='http://www.megalinux.net/2005/01/qmail-statistic.html';return true;" onmouseout="window.status='';return true;">Megalinux - Qmail Statistics</a> 
            </div>
        </content>
        <dc:subject>linux</dc:subject>
<dc:subject>qmail</dc:subject>
<dc:subject>ubuntu</dc:subject>

    </entry>
    <entry>
        <link href="http://blog.alphalogic.org/archives/108-Array-sortieren-und-Umlaute-+-Reihenfolge-beachten..html" rel="alternate" title="Array sortieren und Umlaute + Reihenfolge beachten. " />
        <author>
            <name>Alpha</name>
                    </author>
    
        <published>2008-02-20T12:59:21Z</published>
        <updated>2008-02-20T16:56:39Z</updated>
        <wfw:comment>http://blog.alphalogic.org/wfwcomment.php?cid=108</wfw:comment>
    
        <slash:comments>0</slash:comments>
        <wfw:commentRss>http://blog.alphalogic.org/rss.php?version=atom1.0&amp;type=comments&amp;cid=108</wfw:commentRss>
    
    
        <id>http://blog.alphalogic.org/archives/108-guid.html</id>
        <title type="html">Array sortieren und Umlaute + Reihenfolge beachten. </title>
        <content type="xhtml" xml:base="http://blog.alphalogic.org/">
            <div xmlns="http://www.w3.org/1999/xhtml">
                <div class="php" style="text-align: left"><ol><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> make_sort_function<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$field</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #0000ff;">$from</span>&#160; &#160;= <span style="color: #ff0000;">"array('Ü',&#160; 'ü',&#160; 'Ö',&#160; 'ö',&#160; 'Ä',&#160; 'ä',&#160; 'ß',&#160; </span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; '&amp;Uumml', '&amp;uuml', '&amp;Ouml;', '&amp;ouml;', </span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; '&amp;Auml;', '&amp;auml;', '&amp;szlig;')"</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #0000ff;">$to</span>&#160; &#160; &#160;= <span style="color: #ff0000;">"array('Ue', 'ue', 'Oe', 'oe', 'Ae', 'ae', 'ss', 'Ue',&#160; &#160; &#160;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;'ue', 'Oe', 'oe', 'Ae', 'ae', 'ss')"</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #0000ff;">$code</span> = <span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\$</span>a = str_replace($from, $to, <span style="color: #000099; font-weight: bold;">\$</span>a['$field']);<span style="color: #000099; font-weight: bold;">\n</span>"</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #0000ff;">$code</span> .= <span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\$</span>b = str_replace($from, $to, <span style="color: #000099; font-weight: bold;">\$</span>b['$field']);<span style="color: #000099; font-weight: bold;">\n</span>"</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #0000ff;">$code</span> .= <span style="color: #ff0000;">"if (<span style="color: #000099; font-weight: bold;">\$</span>a == <span style="color: #000099; font-weight: bold;">\$</span>b) return 1;"</span>;&#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #0000ff;">$code</span> .= <span style="color: #ff0000;">"return strnatcmp(<span style="color: #000099; font-weight: bold;">\$</span>a, <span style="color: #000099; font-weight: bold;">\$</span>b);"</span>; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #b1b100;">return</span> <a href="http://www.php.net/create_function"><span style="color: #000066;">create_function</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'$a,$b'</span>, <span style="color: #0000ff;">$code</span><span style="color: #66cc66;">&#41;</span>; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> sort_array<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$array</span>, <span style="color: #0000ff;">$order</span> = SORT_ASC<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #0000ff;">$from</span>&#160; &#160;= <span style="color: #ff0000;">"array('Ü',&#160; 'ü',&#160; 'Ö',&#160; 'ö',&#160; 'Ä',&#160; 'ä',&#160; 'ß',&#160; </span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; '&amp;Uumml', '&amp;uuml', '&amp;Ouml;', '&amp;ouml;', </span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; '&amp;Auml;', '&amp;auml;', '&amp;szlig;')"</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #0000ff;">$to</span>&#160; &#160; &#160;= <span style="color: #ff0000;">"array('Ue', 'ue', 'Oe', 'oe', 'Ae', 'ae', 'ss', 'Ue',&#160; &#160; &#160;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #ff0000;">&#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;'ue', 'Oe', 'oe', 'Ae', 'ae', 'ss')"</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #0000ff;">$code</span> = <span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\$</span>a = str_replace($from, $to, <span style="color: #000099; font-weight: bold;">\$</span>a);<span style="color: #000099; font-weight: bold;">\n</span>"</span>;&#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #0000ff;">$code</span> .= <span style="color: #ff0000;">"<span style="color: #000099; font-weight: bold;">\$</span>b = str_replace($from, $to, <span style="color: #000099; font-weight: bold;">\$</span>b);<span style="color: #000099; font-weight: bold;">\n</span>"</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #0000ff;">$code</span> .= <span style="color: #ff0000;">"if (<span style="color: #000099; font-weight: bold;">\$</span>a == <span style="color: #000099; font-weight: bold;">\$</span>b) return 1;"</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #0000ff;">$code</span> .= <span style="color: #ff0000;">"return strnatcmp(<span style="color: #000099; font-weight: bold;">\$</span>a, <span style="color: #000099; font-weight: bold;">\$</span>b);"</span>;&#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #0000ff;">$function</span> = <a href="http://www.php.net/create_function"><span style="color: #000066;">create_function</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'$a,$b'</span>, <span style="color: #0000ff;">$code</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <a href="http://www.php.net/uasort"><span style="color: #000066;">uasort</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$array</span>, <span style="color: #0000ff;">$function</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$order</span> != SORT_ASC<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <span style="color: #b1b100;">return</span> <a href="http://www.php.net/array_reverse"><span style="color: #000066;">array_reverse</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$array</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$array</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #66cc66;">&#125;</span>&#160; &#160; </div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">function</span> sort_array_by_field<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$array</span>, <span style="color: #0000ff;">$field</span>,</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #0000ff;">$order</span> = SORT_ASC<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #0000ff;">$function</span> = make_sort_function<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$field</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <a href="http://www.php.net/uasort"><span style="color: #000066;">uasort</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$array</span>, <span style="color: #0000ff;">$function</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$order</span> != SORT_ASC<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <span style="color: #b1b100;">return</span> <a href="http://www.php.net/array_reverse"><span style="color: #000066;">array_reverse</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$array</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; &#160; &#160; <span style="color: #b1b100;">return</span> <span style="color: #0000ff;">$array</span>;</div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&#160; &#160; <span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span></div></li><li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;"><div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #000000; font-weight: bold;">?&gt;</span> </div></li></ol></div> 
            </div>
        </content>
        <dc:subject>codeschnipsel</dc:subject>
<dc:subject>php</dc:subject>
<dc:subject>scripts</dc:subject>
<dc:subject>web</dc:subject>

    </entry>

</feed>