<?php

    
// Some Settings
    
$twitter_url "http://twitter.com/statuses/user_timeline/14155500.rss";
    
$simplepie_location "../php/simplepie.inc";
    
$cache_dir "../cache";
    
$twitter_num 3;

    
// Creates a string with relative time reference.
    //
    // Source: http://blog.blazed-designs.com/2009/04/01/make-your-date-stamps-like-twitter/
    
function time_twit($time)
    {
        
//The Output the time is used at
        
$format "F m, Y g:i a";

        
//Time presets for the lazy (Time goes by seconds)
        
$timeyear 365 24 60 60;
        
$timemonth 30 24 60 60;
        
$timeweek 24 60 60;
        
$timeday 24 60 60;
        
$timehour 60 60;
        
$timemins 60;
        
$timeseconds 1;

        
//today's date
        
$today time();
        
        
//Get the time from today by minusing the time looked at by today's date
        
$x $today $time;
        
        
//These define the out put
        
if($x >= $timeyear)
        { 
$x date($format$x); $dformat=""$pre ="on the date: "; }
        elseif(
$x >= $timemonth)
        { 
$x date($format$x); $dformat=""$pre ="on the date: "; }
        elseif(
$x >= $timeday)
        { 
$x round($x $timeday); $dformat="days ago"$pre ="about"$x round($x); }
        elseif(
$x >= $timehour)
        { 
$x round($x $timehour); $dformat="hours ago"$pre ="about"; }
        elseif(
$x >= $timemins)
        { 
$x round($x $timemins); $dformat="minutes ago"$pre ="about"; }
        elseif(
$x >= $timeseconds)
        { 
$x round($x $timeseconds); $dformat="seconds ago"$pre ="about"; }

        return 
$pre." ".$x." ".$dformat;
    }

    
// Html'lify plain text links to html links.
    //
    // Source: http://www.gidforums.com/t-1816.html
    
function autolink( &$text$target='_blank'$nofollow=true )
    {
        
// grab anything that looks like a URL...
        
$urls  =  _autolink_find_URLS$text );
        if( !empty(
$urls) ) // i.e. there were some URLS found in the text
        
{
            
array_walk$urls'_autolink_create_html_tags', array('target'=>$target'nofollow'=>$nofollow) );
            
$text  =  strtr$text$urls );
        }
    }
    function 
_autolink_find_URLS$text )
    {
        
// build the patterns
        
$scheme         =       '(http:\/\/|https:\/\/)';
        
$www            =       'www\.';
        
$ip             =       '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
        
$subdomain      =       '[-a-z0-9_]+\.';
        
$name           =       '[a-z][-a-z0-9]+\.';
        
$tld            =       '[a-z]+(\.[a-z]{2,2})?';
        
$the_rest       =       '\/?[a-z0-9._\/~#&=;%+?-]+[a-z0-9\/#=?]{1,1}';            
        
$pattern        =       "$scheme?(?(1)($ip|($subdomain)?$name$tld)|($www$name$tld))$the_rest";

        
$pattern        =       '/'.$pattern.'/is';
        
$c              =       preg_match_all$pattern$text$m );
        unset( 
$text$scheme$www$ip$subdomain$name$tld$the_rest$pattern );
        if( 
$c )
        {
            return( 
array_flip($m[0]) );
        }
        
        return( array() );
    }
    function 
_autolink_create_html_tags( &$value$key )
    {
        
$target $nofollow null;
        
$value "<a href=\"$key\">$key</a>";
    }

?>
<?= 
'<?xml version="1.0" encoding="UTF-8"?>'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>apoc.sixserv.org</title>
    <link href="favicon.png" rel="shortcut icon" type="image/png" />
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8"/>
    <style type="text/css">
        body {
            font-family: "Trebuchet MS",Helvetica,Jamrul,sans-serif; 
            font-size: 13px; 
            margin: 13px;
        }
        
        a, a:visited { 
            color: #455EA9; 
        }
        
        a:hover { 
            text-decoration: none; 
        }
        img { 
            margin: 8px; 
            margin-right: 21px; 
            border: 0px;
            float: left;
        }
        small { 
            font-size: 11px; 
        }
        li {
            list-style-type: square;
        }
        code {
            border: 1px solid #ccc; 
            background-color: lightblue; 
            padding: 3px; 
            position: relative; 
            /* top: 10px; */
        }
        .title a {
            color:black; 
            text-decoration: none;
        }
        .main {
            float: left;
        }
        .twitter {
            width: 450px;
            line-height: 12px;
        }
        .twitter li {
            margin-bottom: 8px; 
        }
        .twitter_time a { 
            color: #999; 
            text-decoration: none;
        }
        .twitter_time a:hover {
            text-decoration: underline;
        }
        .main img {
            margin-right: 32px;
            float: left;
        }
        .lang {
            color: #999;
        }
        .urltitle {
            margin-bottom: 20px; 
            font-style: normal; 
            font-weight: normal; 
            font-size: 15px; 
            text-shadow: 1px 1px 0 #FFFFFF; 
        }
        .urltitle a {
           color: black;
           text-decoration: none;
        }
        .urltitle a:hover {
           text-decoration: underline;
        }
    </style>
</head>
<body>
    <h1 style="margin-bottom:0; font-style:normal; font-weight:normal; font-size:30px; text-shadow:1px 1px 0 #FFFFFF; font-family: helvetica,arial,freesans,clean,sans-serif;  color: #99A7AF;">
      <span style="color: #bbccd6;">Matthias</span> -apoc- <span style="color: #bbccd6;">Hecker</span>
    </h1>
    <div class="urltitle"><a href="http://apoc.sixserv.org/">apoc.sixserv.org</a></div>

    <div class="main">
        <a href="http://twitter.com/4poc">
            <img src="tweet.jpg" width="64" height="64" alt="Twitter Feed" />
        </a>
        
        <ul class="twitter">
        <?php

            
require_once($simplepie_location);
            
$feed = new SimplePie($twitter_url);
            
$feed->handle_content_type();
            
$feed->set_cache_location($cache_dir);
            
$feed->init();
            
$items $feed->get_items();
            for(
$i=0$i<count($items) and $i<$twitter_num$i++)
            {
                if(empty(
$items[$i])) break;
                
$item $items[$i];

                
$tweet $item->get_title();
                
$tweet str_replace("4poc: """$tweet);
                
autolink($tweet);
                
$tweet_time time_twit($item->get_date("U"));

                
?><li>
                    <small>
                        <?= $tweet ?>
                        <span class="twitter_time"><a href="<?= $item->get_link() ?>"><?= $tweet_time ?></a></span>
                    </small>
                </li><?php
            
}

        
?>
        </ul>

        <h2>pages</h2>
        <ul>
            <li><a href="http://sixserv.org/">Sixserv Blog</a><br /></li>
            <li><a href="http://twitter.com/4poc">Twitter</a></li>
            <li><a href="http://github.com/4poc">Github</a></li>
            <li><a href="http://snippets.dzone.com/user/4poc">DZone Snippets</a></li>
        </ul>

        <h2>projects</h2>
        <ul>

            <li><span class="lang">[python]</span> <a href="/code/mtget.py">mtget</a></li>
            <li>content extraction: <span class="lang">[python]</span> <a href="/code/ccbce.py">ccb</a>, <span class="lang">[ruby]</span> <a href="/code/ce_density.rb">density</a></li>
            <li><span class="lang">[ruby]</span> rbot plugins: <a href="http://wiki.github.com/4poc/rbot-plugins/inotify">inotify</a>, <a href="http://rbot.noway.ratry.ru/plugins/show/19">soupio</a>, <a href="http://rbot.noway.ratry.ru/plugins/show/25">fml</a>, <a href="http://rbot.noway.ratry.ru/plugins/show/22">ircgw</a></li>
            <li><span class="lang">[javascript]</span> <a href="http://apoc.sixserv.org/translate_onmousemove.html">translate onMouseMove</a></li>
            <li><a href="/code">other code</a><br /><br /></li>
            
            
            <li><a href="nicktester/">Nicktester</a></li>
            <li><a href="requestinfo/">HTTP Request informations</a></li>
            <li><a href="https://dev.geekosphere.org/projects/vbrowsefile/wiki">vBrowseFile</a> 
                (<a href="http://sixserv.org/tag/vbrowsefile/">articles</a>)</li>
            
        </ul>

        <h2>articles</h2>
        <ul>
            <li>2010-05-21 <a href="http://sixserv.org/2010/05/21/dynamic-loading-of-sdl/">Dynamic Loading of SDL</a></li>
            <li>2010-02-10 <a href="http://sixserv.org/2010/02/10/javascript-onmousemove-google-translation/">JavaScript: onMouseMove Google Translation</a><br /><br /></li>

            <li>2009-11-09 <a href="http://sixserv.org/2009/11/09/content-extraction-algorithmen-densityccb/">Content Extraction Algorithmen: Density/CCB</a> (german)</li>
            <li>2009-05-27 <a href="http://sixserv.org/2009/05/27/webscripting-mit-ruby-und-mechanize/">Web scraping mit Ruby/Mechanize</a> (german)</li>
            <li>2009-01-24 <a href="http://sixserv.org/2009/01/24/ivacy-vpn-unter-linux-pptp-und-socks5/">Ivacy VPN unter Linux: PPTP/OpenVPN und Socks5-Gateway</a> (german)</li>
        </ul>
        
        <h2>vulnerabilities</h2>
        <ul>

<li>2010-04-08 <a href="http://www.securityfocus.com/archive/1/510592/30/0/threaded">TCPDF Library Remote Code Execution Vulnerability</a></li>

<li>2010-02-24 <a href="http://www.securityfocus.com/archive/1/509719/30/0/threaded">Rbot Owner Reaction Command     Execution</a></li>

<li>2010-02-08 <a
href="http://www.securityfocus.com/archive/1/509450/30/30/threaded">JDownloader
Remote Code Execution</a></li>

        </ul>

        <h2>contact</h2>
        <ul>
            <li>mail: <a href="mailto:apoc at sixserv.org">apoc at sixserv.org</a> </li>
            <li>irc: <a href="ircs://irc.teranetworks.de/sixserv">#sixserv@irc.teranetworks.de</a> (SSL!) (<a href="https://apoc.sixserv.org:5164/?channels=sixserv">qWebIRC Client</a>)</li>
            <li>jabber: <a href="xmpp:apoc@swissjabber.ch">apoc@swissjabber.ch</a><br /><br /></li>
            <li>
              <a href="/apoc.asc">GnuPG Public Key</a><br />
              <span style="font-size: 10px; margin-bottom: 5px; display: block;">Fingerprint:</span>
              <code style="margin: 0px;">D352 1763 5C20 22AF FCE2 A9F1 5A58 68CE A155 B8CB</code><br /><br />
            </li>
        </ul>
        
        <p><small>
            <a href="index.phps">view source of this page</a>
        </small></p>
</div>

</body>
</html>