PPHP - Paul's Personal Home PagePersonal Home Page

Search Google

Documentation

References

Things used in this code: All files required to get this running:

Preparation

Firstly install the necessary packages. I'm a debian user, so I do this:
    aptitude install xsltproc wget php-xml
Depending on your version of php, you may need to install some similar php-xml library.

A guide to the code

The Array

In the PHP Code I build a multi-dimensional array of all my feeds, which incluldes the title, url, and icon.
The array is sectioned into column1, column2, column3, with arrays of feeds inside them.

The icons

I used http://b64.io/ to base64 all my images. You can use what ever method you want, or you can use regular images on the filesystem.
The "logo" image (the cartoon Paul Willard), is 50x50 pixels, the feed icons are 30x30 pixels.

The caching

I cache the feeds in feed-cache.txt so that when I am downloading new rss feeds in to the xml files, the PHP will probably still be reading from the cache, so I shouldn't get funky half finished xml files.

Speeding up load times

I loaded the bootstrap.min.css inline to speed load times. This is probably not necessary.
The external Javascript files (bootstrap.min.js and jquery.min.js) are loaded asyncronously ( <script async src=" ) to speed up load times.
    Update: I've added a "back to top" button, now I can't load jquery asyncronously :(
I host local copies of jquery.min.js, bootstrap.min.js, and bootstrap.min.css as I am in New Zealand, and international CDNs actually slow things down here.
In New Zealand it is quicker to download these from my server (which is based in New Zealand).

Cron

In the BASH Code I have defined PWD as the installation path. You will need to change this in the bash code to your path.
You will also need write access for the webserver user (in my case www-data) to the directory where this will run. This is because it writes a file (feed-cache.txt), and the CRON job will write xml files.
I placed my CRON job in /etc/crontab, and is documented in the BASH Code. You can alternatively install in to a user crontab.
    crontab -e

PHP Code

Place this in a webserver writable directory. See the written documentation about which files will be written.

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <script src="jquery.min.js"></script>
        <script async src="bootstrap.min.js"></script>
        <script type="text/javascript">
        $(document).ready(function(){
             $(window).scroll(function () {
                    if ($(this).scrollTop() > 50) {
                        $('#back-to-top').fadeIn();
                    } else {
                        $('#back-to-top').fadeOut();
                    }
                });
                // scroll body to 0px on click
                $('#back-to-top').click(function () {
                    $('#back-to-top').tooltip('hide');
                    $('body,html').animate({
                        scrollTop: 0
                    }, 800);
                    return false;
                });
                
                $('#back-to-top').tooltip('show');

        });
        </script>
        <title>PPHP - Paul's Personal Home Page</title>
<link rel="shortcut icon" href="favicon/favicon.ico" />
<link rel="apple-touch-icon" sizes="57x57" href="favicon/apple-icon-57x57.png">
<link rel="apple-touch-icon" sizes="60x60" href="favicon/apple-icon-60x60.png">
<link rel="apple-touch-icon" sizes="72x72" href="favicon/apple-icon-72x72.png">
<link rel="apple-touch-icon" sizes="76x76" href="favicon/apple-icon-76x76.png">
<link rel="apple-touch-icon" sizes="114x114" href="favicon/apple-icon-114x114.png">
<link rel="apple-touch-icon" sizes="120x120" href="favicon/apple-icon-120x120.png">
<link rel="apple-touch-icon" sizes="144x144" href="favicon/apple-icon-144x144.png">
<link rel="apple-touch-icon" sizes="152x152" href="favicon/apple-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-icon-180x180.png">
<link rel="icon" type="image/png" sizes="192x192"  href="favicon/android-icon-192x192.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="96x96" href="favicon/favicon-96x96.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
<link rel="manifest" href="favicon/manifest.json">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="favicon/ms-icon-144x144.png">
<meta name="theme-color" content="#ffffff">
        <style>
<?php
print file_get_contents("bootstrap.min.css");
print 
file_get_contents("calendar/css/calendar.css");
?>

@font-face {
  font-family: 'Glyphicons Halflings';
  src: url('calendar/fonts/glyphicons-halflings-regular.eot');
  src: url('calendar/fonts/glyphicons-halflings-regular.eot?#iefix') format('embedded-opentype'), url('calendar/fonts/glyphicons-halflings-regular.woff') format('woff'), url('calendar/fonts/glyphicons-halflings-regular.ttf') format('truetype'), url('calendar/fonts/glyphicons-halflings-regular.svg#glyphicons-halflingsregular') format('svg');
}
            a:visited { color: #a3bcd1; }
            .head { border-bottom: 1px solid #cccccc; padding-bottom: 5px; }
            .gsearch, .feed_logo { float: left; padding-right: 5px; }
            .menu { float: right; }
            h1 a, h1 a:visited, h1 a:hover { color: #343434; text-decoration: none; }
            h1.headline {
              text-shadow: 0 2px white, 0 3px #777;
            }
            .headline {
              border-bottom: 1px solid #aaa;
              margin: 15px 0;
              padding: 5px 0;
              position: relative;
              color: #343434;
              font-weight: normal;
              font-family: sans-serif;   
              line-height: 42px;
            }
            @media (max-width: 576px) {
                .headline { font-size: 20px !important; }
            }

            .headline:before,
            .headline:after {
              content: '';
              border-right: 20px solid #fff;
              border-top: 15px solid #aaa;
              bottom: -15px;
              position: absolute;
              left: 25px;
            }

            .headline:after {
              border-top-color: #fff;
              border-right-color: transparent;
              bottom: -13px;
              left: 26px;
            }
            .back-to-top {
              cursor: pointer;
              position: fixed;
              bottom: 20px;
              right: 20px;
              display:none;
            }
            .sub-heading {
                position: relative;
                background: #fff;
                border-bottom: 1px solid #343434;
                float: left;
                margin-left: 20px
            }
            .sub-heading:after, .sub-heading:before {
                top: 100%;
                left: 50%;
                border: solid transparent;
                content: " ";
                height: 0;
                width: 0;
                position: absolute;
                pointer-events: none;
            }

            .sub-heading:after {
                border-color: rgba(255, 255, 255, 0);
                border-top-color: #fff;
                border-width: 10px;
                margin-left: -10px;
            }
            .sub-heading:before {
                border-color: rgba(52, 52, 52, 0);
                border-top-color: #343434;
                border-width: 11px;
                margin-left: -11px;
            }
            .minor-heading:before {
                content:" \2192 ";
            }
            .minor-heading:after {
                content:"  ";
            }
            .minor-heading { margin-left: 5px; }
            .calnav {
                padding-top: 5px;
                padding-bottom: 5px;
                text-align: center;
            }
            #weatherframe {
                width: 100%;
                height: 100%;
            }
            #weatherModal .modal-body {
                height: 650px;
            }
        </style>
    </head>
    <body>
        <div class="container">
            <div class="head">
            <h1 class="headline"><a href="<?php echo $_SERVER['PHP_SELF']; ?>"><img alt="PPHP - Paul's Personal Home Page" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAASBklEQVR42sVaB1iUV7pm09yYaIyuSTSuGuPariXrVZNYkqwajYleXWOJDVFUlC5N2iC9g4BSpRdBBJQoIAwwzCBVkICCoFgTUKNgVIyiyHu/74zMoxc06GV3z/Oc5//PP2dmvve871fOmVHr6YYzkeI6a9KI1wb2UnvNUXfp+zbblui5Gi7bY7ttsVmA9dqSSOdttUHW6+QB1utzvUzW7LbSWvyPvXaa/X3NfuhPb32F3z92SF+1/0ibNvr9J4evOmgvMvMyXuGW5GN4qzjRBcXx9iiiXpLggJJEF+pOKNnvjBOpvpCGWiLRSxfxblvvGWssWMof4Gup8Z8Dw81y06I1CV7bf8wKMm6VhVuQwc4oiLOlqysKYm1QmuSBkgN0v88ex5O9UMjXJHcB7liUBVL3mDQsmTN5HH9WXrznv97gb2eOU93/tX+vgZJN3zin+Bk1lKZ43yuId8TxFC8y2A2VGcHIj7Yhw+1QTKAUkRYopPvSZA/IQk1wLMZajAvjHVCU4EivEzveBqc3rZg/hj977tS//WsA1GUGiqurhe6rOqvmTNttpXHkkI8+CmN3kvGeyA02RGGcHRlvRUZKwLJio8sO+YguZLafpEW9Ii0A5al+yI+0IhBOKD3gzoAJmC32ues0mm+YP+HJ754yckDPgJgxTukH/d9Q67XHZpOXLMaRANiQ4TvJ6J0oJCbKDu5iJshYZzE+Fi2h12xEzws349eF0fJwc+RHWeMYLUARzS2iuSyzkmRPkpcp0oPM4Ge28u6KedNm01f26jEm5k0ZpnLkYLstEXnRO9uL9zux/smoHUIe5T/6saS4MxA2jPzClubYCR85ftAbRTSviGQk/EP4jhsKCEwxsZDqZ4BQO032Exyie2mkLQ76Gt4kyWbb6yxdzV9uqLHo5QBw5Ni6eErHsE+ow5bj+TESdk6Sj7UwpIiN5oiU5MaG8+oyQGGw8Am60lxyZnPEuWmjIJqkpAQhAOfHOSB5txHC7DehMIHGUVaCwShXH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Qt2Hxef+ohz24wauTXnDlWuqMmTQGfNZ/f+/vEAXQDClu/njn15Rr6YOKSv5sLJc2IcNMgwCzaWszs7OcuMGeD4z79ePS5h7DgwMDti1YWU6NoxZkaYLb4XPkM9ymU9GitdmBEOsVQQard9/enwhpkTP5xjvvUf4u8c/5w95uVBzP77UHFV/3ZKb3f9/ylQhlVH1j+vKPsKXW3omT3f828mDIYdW1TKorAkGYq8omSOF4IXgQHSM2vxU3WU+wZxuFCdJ2nbrjHj1qhBb6epL540UK2n2/ABaq8snzPxq0h7jQopr3aoKRtGVzPOE2KnyCD5GcuFgTJTylWXsLx4zPcsKwbC4AQw/iVMsvVbuO747uq0se8dGjPk7e86vpfOrEQE7fG27fuZP9BKtrH2ZQSAjVIaaC30r8ofBIZ/vuYxZ3sGxFGLpcgLwe9n0DzmOdPHDT40qM+rU5fPH6cqAoOclve4/ap/6EwZO/Q9y43fHKUsr1pZSnisfy4EOQioQrM0QIc3XAyKWRNGFyr/nyJAC8ePtUaQZP0j+uh+av+utmjWeNX9um+n7jjgrXeHpcKSYhDZwQaPQ61ElCPHuHiMsGyXsqxCze7nhBjfS/fd3CYN0KYkqkvztz8MkaifXzpzpP6//b9Z/GVm6nOVMlvy36PC7TaejrZbcyfWft2tZD+Tawnu2nXRDhtPRNhvkAfv1DzsZbjYe5fxUn/619Amw1VfrvA2/SFgn5tWS7yXYbHF+rlb+72hNog/i8D0iH3/C9uNai6iHX8MAAAAAElFTkSuQmCC" />Personal Home Page</a></h1>
            <div class="menu"><span><a href="#" data-toggle="modal" data-target="#weatherModal" id="weather-link">Weather</a> | <a href="<?php echo $_SERVER['PHP_SELF']; if(!isset($_GET["src"])) { echo "?src=1"; } ?>" data-toggle="tooltip" title="<?php if(isset($_GET["src"])) { echo "hide "; } else { echo "show "; } ?>source code">&lt; &#47;&gt;</a></span></div>
            <img class="gsearch" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAABmJLR0QA/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YeQC2EESIjxVucExo2eftM1+nNns7h/sKMtBaGE5HCU5TijkAtwOwATZBrBMaB0c4k9tGX3zbbepnGmGUsuVUqkKgAiEZI0WWaLJ6wTbz2xyB1M/7EDNVk//J3aU5iC0qByO4lftMMx3QH4AMIEERAUR35mFkbdyYMIFQykopdpB1JOwC5kmJESkQ8j3blxpK7lYlsDkDTdRWxATQapL3kBo8X4AgL34tWSQuQCnCILeOP9MM/HWfNrh7lQKVxVUxcmNzi99+V1JBOpFhCSVCP8mub7Lskp/3RYrU9ffQF2Rt/8/EHvx6wgv/apXt+2ZFy8qODHe/6Ln6Y752sFBV07fVr3TtgSeBNlA0kMhhVQkW4XMI6SsrjBWT17Thp93DL4/uDeAL15BeNmBe9p9+QFUfeRC2ha/k8IcCotIDu0eJFQkWknJM22u0rMFUfLs+3+hftew/sGRSE/1jl/YomKe8i4mWShkHAmSVBRpFdF5CZOGlhyZrzhhZTMu7E58eDAA9FTvc+vaDbthLCJRSDKOFIpoRa2vi2Wt09oqv/jZyODYZQ2PBgwAPdU7Na/dRsFCCguFOo5aU7RW2goFKDL2tz2j/7hjZD6s1BbEYOr6G6grjNWmzVUqovOo9XXRWokVhlg6JKJ516x+FFJX5MXkNW04WxAlCZOGlohlrdNWKKAt6x9SFlPkGgA80lTfLj3VOz63yUnRQ0U0KXLt9+IJ1mN//kxY2dzn+uilFx7/22vssoY+vwHgXxr4+XJ14aDHAAAAAElFTkSuQmCC" alt="Search Google" />
                <form method="get" action="https://www.google.co.nz/search" target="_blank">
                    <input type="text" name="q" size="31" value="" placeholder="search google ...." autofocus accesskey="q" />
                </form>
            </div>
            <div class="pt-1">
                <div class="calnav form-inline">
                    <div class="btn-group">
                        <button class="btn btn-primary" data-calendar-nav="prev"><< Prev</button>
                        <button class="btn btn-default" data-calendar-nav="today">Today</button>
                        <button class="btn btn-primary" data-calendar-nav="next">Next >></button>
                    </div>
                    <div class="btn-group">
                        <button class="btn btn-warning" data-calendar-view="year">Year</button>
                        <button class="btn btn-warning" data-calendar-view="month">Month</button>
                        <button class="btn btn-warning active" data-calendar-view="week">Week</button>
                        <button class="btn btn-warning" data-calendar-view="day">Day</button>
                    </div>
                </div>
            </div>
            <!-- calendar row -->
            <div class="row">
                <div class="col-md-12">
                    <div id="calendar"></div>
                </div>
            </div>
            <div class="row">
                <div class="col-md-12">
                    <a href="/calendar" data-toggle="tooltip" title="View the full calender" >View full calendar</a>
                </div>
            </div>

            <div class="modal fade" id="events-modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                <div class="modal-dialog">
                    <div class="modal-content">
                        <div class="modal-header">
                            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                            <h3 class="modal-title">Event</h3>
                        </div>
                        <div class="modal-body" style="height: 100px">
                        </div>
                        <div class="modal-footer">
                            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
                        </div>
                    </div>
                </div>
            </div>            
            <!-- end calendar row -->
            <div class="row">
<?php
function getContent() {
    
# lets keep a cache, less chance of loading dodgy XML files while I am wget'ing them
    
$file dirname(__FILE__)."/feed-cache.txt";
    
$current_time time();
    
$expire_time 60;
    if(
file_exists($file)) $file_time filemtime($file);
    if(
file_exists($file) && ($current_time $expire_time $file_time)) {
        return 
file_get_contents($file);
    } else {
        
# too old, get fresh content
        
$content getFreshContent();
        
file_put_contents($file$content);
        return 
$content;
    }
}

function 
getFreshContent() {
    
# RSS Feeds need to be added in column order i.e. column 1 feeds first, column 3 feeds last etc.
    # Max 3 columns (at this stage)
    # Actually, I could probably sort the array :O .. lazy
    
$html "";
    
$newsSource = array(
        
"column1" =>
            array(
                array(
                    
"title" => "NZ Herald",
                    
"url" => dirname(__FILE__)."/nzherald.xml",
                    
"logo" => "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAAChVBMVEUQCwwTDw8VEBEYFBUYFRYZFBUZFRUZFRYZFhYZFhcaFRYaFRcaFhYaFhcaFxgbFxgcFxgcGB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fVti5NWVugNNjl03hlc1CkI3j5VRRtF7NDpXlQdR8QlZFQkbMH6V6ERXpC2tYdGrJuy1gFMuYB7Z7KLYdi+FEg1pYsWcmsvGDWJBS7YWCbhtmeava4S9MnoRgOA5WmG3brRh28NrMPJC2PJn2iqSfdSsk2IK8hf/21adxyuajSF7IMuYTEpGXFjIL3XpvDIZuJIn25Vtk/NCTMSU3Z9fi1K+WCMlNQpM/l7wTTaxJPXrt2KYglEi2+LyOl5mbO2BO4s0G7Q+d5wrmEcmkA485RdqWyps8AAAAASUVORK5CYII="
                
),
                array(
                    
"title" => "Stuff",
                    
"url" => dirname(__FILE__)."/stuff.xml",
                    
"logo" => "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAIAAAC0Ujn1AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QgMCiYjB0ThfgAAA9hJREFUSMfVVk1oG1cQfruyfla2pcTUShvbManB4EMhbcBOaakPpYYWHwKFBnoomOZsXEMwxQc3dg+FIlOjQ0qLeqjADjgU/COb/pJARKWmTdOkhsixallxZK9kr7SL9k+7700PKuruaiW7hxw6p933Zr4Z5s18MxQAoKcjNHpq0nQcpX1V+fmwmJEVClAH03yhzdfBuBEigGiqvhVlmxBAiEJoRxEi2YffsXkKPBdOPHfG46XA8VjW43lR05k3Tp147/nWsy0uQEAhOxdgJxqBK4++7Y1d2xSLOsGEYOMtJgSIli4pfd8cjsYLuvm2KjbQeVV6If7ZdXYDjhZ8Iy31LfJ7sno0NKeJryZm05IAx5asJL+4UGClcl1oAgQTcvHO1R3poNa+WCwuLi6Gw+H19XVRFK3oojwQ5jDoBIh91JH0wg9szGK2urra09NjeaHu7u6JiQmjWvSheHWds4maACmo+Su/vm/BTSQSDYpyamrKoKsPf3rwpFCujZrEdiP7pW0LtNvtrgIxDNPf3+/z+aonmUzGlBZO/SpaANArv9WWoYrCrVMd7xqD2t7eVlW1+suybGtra+U8GAz6/f6uri6j/rMnm+7/XkZvOUx1renCrY13AEwVurW1ZbScnp62hGkRQvQPP9rjedWUEI6/mcxMWlRVVaVpK8n4fL7Z2VlCiC165Gvul3ip8v2Ppa7nWlwBC4rL5VpaWrIcCoIwPj7OMMzY2FjtwwbaKO6gbGI+BwCNSK3q8PDw/Px8b2+v5VxV1bm5uUgkYqUkghxVPqkEL/E/so8/aJBHnudnZmb8fr8RqLOz06J241ru3u2SKdcYF7nka4ToFtVYLMZxpkZYW1urx24EcOjybolXTLmmab/H0URRJoIVRXFwcLC9vT0UCqXT6Qr9BgKBugSNkEvTm31uq1s1FyxLd4xRTE5OmgYSTVOUiZdHRkZMlLkj3vyCrbbMv92Itaxy/ywxlPbo6GiDLnc6nblcztjowTc3+X3Vnp6U7MflfNhEOtHowMAAwzBGUK/XOzQ0ZOG/B9GD70OZOnxNMAZNuvuSLj6orZBUKrWysrK8vJxMJm3q50np87fvYiCNRgHWC0q8Xyv9cfxRUNwVIpduy4Jy9ADTtIL003n1rzAG3BiUADxa27x+KaoI8rFmIwAQUpY3PpEXusrsbxiwxYcOmAAUU3urF0P3voyTOhHYLwsIACgKpH19cwH/GUWHJartnMPbgXWnyKpcMq84Tze//Mrp1897nmn5b3tI1QNBFI0Q1mWSSqBcFuMmfPIM03eOdnmOXIyo/+XO9zeoKLcvf5OUiAAAAABJRU5ErkJggg=="
                
),
                array(
                    
"title" => "Radio NZ",
                    
"url" => dirname(__FILE__)."/rnz_national.xml",
                    
"logo" => "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAABp1BMVEUAAAAGBgYPDw8QEBAREREcHBwuLi4wMDBdXV1sAABuAABwAABxAAByAABzAAB0AAB2AAB3AAB4AAB6AAB7AAB+AAF+AAJ/AAR/AAWAAAaBAAeBAAiCgoKDAAyDg4OEAA6FhYWGABGGABOGhoaHABOHABSHAxOHh4eIABWIBBaIiIiJARaJAheKAhiKAxiMBhuNDR6NDyCPESORFyeSGSiUHS2WITGYJTWYJjWYmJiZKDeaJzebLTucnJycpaSfM0OgqaiiOEiiOkijO0qjPEukP06nsK+pSlesrKyvr6+xsbGyX2m1tbW2Y2+2Z3G4Z3K6aXS6bHi6urq7bXi9cn2+bXi+dH6/eYK/v7/BfobBf4fEc3/Fho7GiJDGiZDHipHJjJXJj5bKkJfKkJjKkZfOmp/PnaLQnKPR0dHSo6jVp63V1dXWqq/b5OPd3d3fvcHf39/hwsblys3nzdDp6enr6+vt2Nvv3eDv7+/w3uHw3+Hw4eLw8PDx4ePz5Of06On06ur19fX27e737e/37vD38fD39/f6+vr6///+/v3+/v7+//////+3dGgIAAABN0lEQVR42qXTRVsCYRSG4aOYoIyjKA5YoNgOdhd2d4CBrdgtBjb2+6P9BhBXM7Pg2d67c72H7KJCdhJtComMi2VT53JrgWxWkSwmQTZTGc1BoQwaV+L0CHn2MKcoP690CMCeC6zjBTy63G73yvIu48VOitbEEGmADm6e8WgyzlIEwWwz1ErcR2Bl0Qh6zfwbMJmGQF368yC/AzihJnTX5VaGeVi3gSAPOp0DUeSDo/FUtxTiA10/QiwV7wEcNWjVY0biJ64Kf/yBKYpDgME3r0osGBBmH9BGCUHe4auNQL3+7p+vAcTSUYDRYBYwxq/B7/e/StxOlwCeidBSCOCL41CSymm12sQkxhOf+99gXXh+Hm7BernCvfeG5fWq33xamXu21uXa3M4mizFTvgqVpUbMCokqL/gLoikQKfnq69gAAAAASUVORK5CYII="
                
),
                array(
                    
"title" => "Google NZ",
                    
"url" => dirname(__FILE__)."/google_local.xml",
                    
"logo" => "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAIoklEQVRIDQXBa6xlZ1kA4Of91tp7n8t05pwZZjozlk6hQK+IUNvGUkXUlGAAkYqKIsjFwB/RIKEmGLT+0ABqlCghhgBJY1OIDUZI6VhALnKJpVDacmmwlF6m087lzOWcs8/ea6/1vT5P9A+8AUCMUvfDC3UPrYtmQWmYTKDouuvr9vZNub15Te5ML86+36NmRNNsxmRyL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VommNJbasVG07nvqB97/jY94cHZPLI+Ws9m5OkTKCLpn3h+1u0uE5o9uPkCExdD8cKdvn7V/5fx1d82PuPX8SyhN9Dnz1We+7f4nHtbPe20ZWW7HRmWkCIuhd2p6xneP/8DHH/qMf3nwdk/vnLY8HlusPBiRo2zmV4fu6c9Ff/7dohlIce+/XQGg1PRIs/Txfxhd/pYqtBLAfNHJTXY3uxxc3WfP0gUiwma/7cRsw+n5WX0OltqxUkJGyqiyLCw9/rovTk5f9dpshi2AFgDGpfre2f1vn5dJt7I+f0c2qMB4NGKN+fbcTzafNGwOMogSSinGzcg4RkRKKZFCOR+fzfrw72d54RYDgAIAMGqG2szyneVU85bYjscyUo0qM2VJuZracWPSTkxGY6NmpIlCIKoaKQOdjXajvaVstzdHjDYBAAoAAAj0PtlsNNc2J5sPlJ14WpKohWG5GtoqJVEpKUtVEfM415xtPtacba6NLj6oWAAAQAsAACDIkidjHn9eZu3fR+sVOa6vrOO8PNu6n1yNPsjYMcTp6D1S5uWoweez5ONZEgAAAPw/+fp1YtEBxVgAAAAASUVORK5CYII="
                
),
                array(
                    
"title" => "Kiwibiker",
                    
"url" => dirname(__FILE__)."/kiwibiker.xml",
                    
"logo" => "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAXCAYAAAAcP/9qAAAExklEQVR42tWVaUxUVxTHz7l33jxmcYORQQyLUlCcoA4tFIvD4qSgJSqLEMRgkUKnmAqiRKpScRdHq61Vg4QYcEsao7ZpcPlg+qG1jbZNjGnTLemX7rRpk7amtjj8O29ep/oA6/KhaU9ycl/ucn7nf+6979L/08xj/RPiUicTQRz8FvJf4zbMZ5R5xC9VXkbtEwTb2JgmrT8qOlqfIJxZRNZM7dNms/EDQZJnzrEHm/JJU92OcF9BRsQ3tXMJR9sEOlcLbKvj68kZ80PUGcnm/l0NjL3LBRblm0BESfcNHe8YV1+YQV93rTIhNoo2FGXJltJ865XtdYwzm014skBgtotxuVPRALWTY+nQ1npxg4gGg47EGMKe5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g9oUNCwTcySFIWU76mFXl3ogvc6YTEqL1P5U71d5FlCj0KCK7wmv5aV+jRO9agcOtjJ61DFbGNNE/m2l/TaFAZ7McbF+qnW5GTCSdHx3lSBlp9pRZldFD+zb2XpVEo1PGjbU+lxBNlaRErqB7MbMt0k2k9BDZ6m2OJHf4lXoQS0l7hP6T9iecFT1aP1y4VwAAAABJRU5ErkJggg=="
                
),
            ),
        
"column2" =>
            array(
                array(
                    
"title" => "YouTrack issues",
                    
"url" => dirname(__FILE__)."/youtrack.xml",
                    
"logo" => "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAIAAAC0Ujn1AAAGjklEQVRIx5VWXWxVWRX+1tr7nNtfbgu0tDCVwcIMPzXDzxQNNeCMIU3IzDgmQ4yGJyLxAZEHeeCBUaLGyDwZRp1xfCAYm1GJDGZGxmBtJgbRgAPjlExKoSA/HXqhpbS9vb337L3X8uHcQikQ43pY2Wefs7797XXW+vYmVYUi3Jnyv+nlnst2aMLPrw6bnrRfW2UXZ/G/7FJBfn7NvZMLNxNpztBLjXbPk3FLBRFAqhrO38Z3jpvhAiIGERRIgsyv1H2b+PklRI8GVeBPubCztzRY0AqGEgKjBK2J6b21FRvrDYU7U/rK782dAgw/EOoFczL6g+do02I8BO8V737qd59LxkoaM5QghMAIjBJpZYbOb6gyry5+2X5wBZGZzYoJBSenP5Wlc7klixngxYCj1/x3z5RcEVWAUbCCoDQdlxd4wHy/ejOPFWdEEsAAAQRjOO/cR7doWQM/UZO+nlT89hJePR2sNxWwDMNkiAwpoOUViHEjUcu3C7gPTDnK/9vcslreBFVqaRiF167N2b6GKy2AC6Py+keunohRzoMSRN3UorZiXRNYRJUFQ4lanV9JY1NldMUZvrkrPlGZsIjEcczMBPjridtzyBrrvbeEmojS5KuqtTaKIi6O337xNVf3ggZhBimaY7L63BJ8cgsVtsxbpKmyfkP7utra2tOnT4+OjopI29Nty5cvv3TpUmtra4oIgIiI6PLly+fPn4/jGiiboGLASkXVrzR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1n9x04/F2mDgWb2BJwSDwPCMYNQxAqs35Fk9I7AaDXFS0uXtBYZjTgxPKL3cENP7vwp9H4jLaBIhsVoyUrRaMpJYlKyWfYTEamJQskisFiMkRhOLxCKx6owyBSMalBxTCby8PnpnXbVd08kX/ipWIAGByTLHCgUDlO5FodD0jpV6iKoCQRQBASipBrZzq7Cilp+u5vY629lgl1axbViE9V+nU4dhsxoIAhKoADrtdVoPJJAzIKdgVGawbL5ZPJ8+O5eX1vHSLNdnKCbEjAqmmAHAMuPZTqMa/vm2RhGQARQQUg8xCiZlwGJBIzU10cImbmmkzzRwcxaWwUyGwATzqMtbWZ5EMHQdZ98PNz7RQh5RHbItmNdCDYtowSJa0EhRDAJAIOBxt8BZ9l+dO7CIBzFjowAAAABJRU5ErkJggg=="
                
),
                array(
                    
"title" => "MandrivaUsers",
                    
"url" => dirname(__FILE__)."/mub.xml",
                    
"logo" => "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAIAAAC0Ujn1AAAEK0lEQVRIx+3WX4gVdRQH8O9v7ty5/1bXbe+u1111d9tW1/2nJkSQIJIoJlFGQS9RgRC9RERgL735lFCBKD4EUUtE0oNkFFniH1IJl8R/+e+ud++6rutdd/eud+7cmfn9zjk9XMM1cvVBoaDzMgPD7zPn/M75DaNEBI8mLDyy+JfRZvKELhx7+LQYly58XMofYjIPmTb5r1E4ypURyEOlqXiaLu5UkZgqD5EJH5RmQTY/DtxzFgVkTn0I9kUo4udN6D0QLcAXe0/WpgAoM3YwHPmOps9AT4lxhXywBqAv7hA3CyZh45gxvzw1O21XL3t+uphOhen6NAA/ICu7W8jVABINKpFRiWZQwKPfKwqEQ4ix2DO3BrFg2X2yzl8vnT6XW9ndopQCEF+0zp3/GsAKUOUR3DgqV76Uoa8QFkU0xIC1Uio2vIuCwl0ddq8abxSAd3U/AJtZjp8arU2pxob624VYqO96tVAerZ/sh7IFLIACwAaswSGgBcqaOOLte1JSbZGFz8VaXrDndmkdlAb3xZPJS0PFVYvWK8/XWz89tKavbvOGlZZ1p6th4N06/t6c8q8iBNYQfdtlDdYkihkkICImMoaQyERbni+WUC5NW5n1bUuWWRVfD+YnGuprLEvNrM6JJeM97wfRxeDwLzEEG2FDAmIQgwgsFiOqLCf0pq79cbg0eSOaaggnzl4+f9q6VnD90DhOtFr0zEiln7AXbQLkTr6iScAMZiERFhFm4eCaWXo1/YGzYlsQb481r0tG3O61b9njU2ViFv6HFivA1mNMPkSDQxEiggiIFYkwQ1gmqWm45vW2FS/1tC0V1jcalzcvbs+nWjkI7CA0gSY/NID8LXEuZXnsF1AAVPdBicCwMINEgXk0ujbo+2hNb2fMqQ6x09LWAaB9yXIAdjJuu144OV0RgZopC5vrP8j0OQUIEwuEQQwW3L432u7csmJVzz2PTFPjHD/UF3I3DXHUjsz4whXNpV0RYRYRIUVGGCKKxKm+g1jmJtVsRyY9Lzn/scSBgWGvEsx8EF7eHXEHRQgSjoWLT0Te/S39zUj8RVBgREjAbHFYnI1OxqNPdWeGx0qf7/19RsrT+ux2X9UNyepjiR2F7r3c/vb58Tr0bnczb7AhJiERDmaj7Zhjb1z9+MGB3K49A/GE8/K67vS8lKpcGa9782Zyg+d0VHwaOJmrifIr6/sWLGiqtO68ftiWXD+Lwqy0EhGvEmzbvf/bg1cU0NPR0Nmarp2bLEyUi6WA/FvN9WrTmr6Vve3xeLK6xnOLo0e2UvYzdLyzdOMns9EASm55Z//Pew4MTpRYWarGUa2N9tNd8559pre3a0kqlVJ3TQ+8SiX/4xZRVtfm/vvQ1R0eyg1lcyNBGKbr5ixszszPNNm2fa+Vnh8OZ8909qx6EPr/X5z/LP0ngpmTVbx+9/YAAAAASUVORK5CYII="
                
),
                array(
                    
"title" => "McRides",
                    
"url" => dirname(__FILE__)."/mcrides.xml",
                    
"logo" => "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAACJVBMVEX/AAD/AQH/AgL/AwP/BQX/Bgb/Bwf/CAj/CQn/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qZy5FeS0pc3Jq3NAkuwmWS1N1bMa3e01xSrnz4R5rDKt2QwoKxU1oSQhUcltnhMDi2t332Ko9Aq/IgchoIdCt9U6zmoQV+gP4I+dNHnuZqh0dEwDKDCk22ZYZ2yLYNCMtQxcBY/vrXW+28JAkcQXkumxvkqSQUQ5YsLU9TDpzUYL0gVZQS7TnrBggjoDA7Pbym0T58GkF7K6izGAdAskbJugA6QdFmzbtnDGOqj0UrCHZVUY5OrLNBg4rMJrgMJzZm6CGe4FDCyb5g5/Jk0ZBs6gRRtm9E2d2TwXntYWp0QUAXlTBBgYFFNXbtu2YcH8BQvWIyVFMHtVvIFtOdQ/WzHT+dZVM+ZtpCQTYQIAd2/UJShKy0YAAAAASUVORK5CYII="
                
),
                array(
                    
"title" => "McRides Comments",
                    
"url" => dirname(__FILE__)."/mcrides_comments.xml",
                    
"logo" => "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAAAZlBMVEX////97uv1l37xcVDwYj795+HxcE72m377wqn8zbb95d/1lXz2nYH0knrxakj7xKzwaEX2noP2oIT7w6v3pYn6uZ/xa0j84dn7xa7xcU76x7n8zLXzgmL3pI/2mHv0hmrxclH+8u9O8xlcAAAAAXRSTlMAQObYZgAAAHZJREFUeNrl0DkOg0AMQFEPGMNsIYGwQ5b7XzIUhmLkQIeQ+O3rPpw8FcUYFEdq0YTSTAdlKRlm67SQ88y3XOL8zoxaDK/M+9e8k/jhmQ0VZYhlQQY4ZQnXZnsiklUgNXNVN5Iwt10P/3kYJ9jg1xu2+POFg/oBofkPDpNtYggAAAAASUVORK5CYII="
                
),
                array(
                    
"title" => "SV Portal",
                    
"url" => dirname(__FILE__)."/svportal.xml",
                    
"logo" => "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAMAAAAM7l6QAAADAFBMVEUNY9OavOLqjJX/CB3G2O7qOEcXZMn6///0AAzU5e/28vPyx8r16uvvsrjI2+4BXNHslJz+/vz+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LA2VNA0nCz14Lt9mb3XeG2FsSdx4NwmmzjPzeIy+d53DjxWc1zYqkgssvvTPn3lxnscuZ1N7EEy82g3yFzwdIhy4uxhVoawoWxN5Cl79/U+xkpzH5DDaHgFkI6RkgILNThkDQPLh/8GCbdCBdjvWWFMOAmVFpwG8jJIX+Zmf9Nfhq7LuQvhHsG7jRQWEI81hEaM/cvOPzYkVz+7LqQGzRCVZb/c5NwuonmsU43RIR63nqA4W/2yVAnSTBhTUyCnhDZF7hS6oV//4QkH+BOyP85gO7FI230H1P6FQN/rlfe/8Xmf2xsbCr//FeytDHxslH8A5VmYPv43ysbKP0//oh7M1BaKcA4Rfc2A1T6tpjrta95/2c1R/NbPmpO+Z9nGbCQX/A2P1Q6JSXF0mB93MILR7qPHDF4HbC+sltGqVu+GygFAGPQ6H31c+y1AAAAAElFTkSuQmCC"
                
),
            ),
        
"column3" =>
            array(
                array(
                    
"title" => "The Register",
                    
"url" => dirname(__FILE__)."/theregister.xml",
                    
"logo" => "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QgMCic7DTNIaQAAA0hJREFUSMfllz1oU20Yhq+cNJWmRbEWA1UwoFCcHARBR6dipUOL6CY4OPsDOqj0U9ChOhRUnBxcRKGjOolDpSg62EkLVROsQ2OGJM3v6Tnve3/DaYxt89N+4SODD9wk57znua9zTp7n5UlIIDoQDh2Kvw/cteWM7dshFgs+u7vBGMjnYWkJMpn/ARyNwtGjMDICx47BgQOwYwe4Lnz/DjMz8Pw5zM6Cta39BGqpnTulGzekXE5N48cPaXRUm/FsDY5EpNu3JWO0qXj9OrjRtsHj41I6rU1HMimdONES3LyqHQdOnoSBgeC4UIBEovlvGI3Wrv/P7TQ4CHv21I6vXQvu12mS5nlQLrcJjkahpyf4fuUKZLPQ39/cMZ2GhYU2wY4TtMyjR/DwISSTQd82i69fYW6ujXYaHJRevpQeP5b6+4Nz+/ZJS0uNCyudls6da6OdDh2SPn4MzBYXpZs3pdOnpTdvJM9rDH7/XopG68O6u6VwuAn44EFpbk5bjmJRunWrPnRoSIrH14IN6LdiMdnp6eYA1w1UZ9cyR45ojV9Xl+ypUzLHj8tEImvWHAP4gIlE0NgYofHxjYXguiiTQakU5s4d7JMnG3pZ+Tzmw4fAKxzG7t8P9+5ho1HMzAy+52HgtyiBSqBKPC6bStWewFrZVErm3TutTE6qMjKicl+fSiDv7t0NW6j98kWVXbtUicflnT8v8+mT3MuXVQqFVGX8KfKgvOOoNDxcc6lU5L14odLwsPKwQeWzZyVr177qUklmdlZ2YUHyfVUuXaqbWxVZUBa0fPhwYGCM3GfPlO3rU2Z1bb1ye/fKFgp1S8AWiypdvKgMNMzPghwP8AAvmcR8/ozNZKg8fcpKoYBfXVunlZ8/caenN+4Jy8uUrl+nODWFv1o7XgM51QtWcjkKk5NgDNWCa6b8xARmcbEGLRbJT0yQn5rCl1rmhy/APxaw1uIlEjgDA3QNDVF89QoBtoH8XA7/2zd6xsYIWUv26lUK9+9jpKZ5VYUS6+bqcCxGz+go/vw85bdvCbWaiM6coWv3bpYfPNjcyLMaoYU6A73T20uotxfz69fmTLZtQ667pZkxNN/gn4Sg5dO2Nd76nZqrTafAtkPgfwFNhTemznRHkAAAAABJRU5ErkJggg=="
                
),
                array(
                    
"title" => "Computerworld",
                    
"url" => dirname(__FILE__)."/computerworld.xml",
                    
"logo" => "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAIAAAC0Ujn1AAAF3klEQVR42qWVeVBTVxSH819n2mm1IhTInrBVbVVQqFgV91orBaXY1rVKHadaquJOxzooWHGBaIC6hCVBK0JYpBUwoDQIWkEI2SSBQhaRJBIREhIkie1p3+Pmkc4402nmzptzz/29792z3BuSgMaCkf8OWXuz+s/xv1GLpTg0vDgsAnnaMziYviZuLeaxGY2YpyxyPpKpCq8U+FFx9O1NW4lQ9OuXyi6/+Taa6m6JQMynMsU7EzGP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8Z7GgKDZ6wBE80MD/mhCcamCeGxoB3AQVYEoNK+zw+PuPMmTWxq8+fO5+Wmjovcm52VhYnk3Ng3/5sblZycnJmRmZOdjaXy83M/NvYm5R0cP+B9PSTSbv3JB86fCr91LGUlKNHfjiRmhY2Y2Yuj7dtawJgSVQ/f4PBoFQoH7a0tLW22my2LC7X6XQ2iMWPlEqnw6FSqeJiV1dWVPT09MwODbNarTKpVCKRjIyMyOXydonksV5vNBgEfD5wFkdF6fV6l8sVzGaTGBTq4OBgEDug/k59Y2MjvKDq6AC0Tqd7+tQEaLVKFb1yZXlpKRBLhUJYEtfX3xU3gGE0GpoaGzU9PVaLpVPdqdVol0Qt7Orqgi54f8pUEp1MeT4wwLt4qfnBg6amJrPZrFar7Xa7QqEIDw1zOZ2dajWGhl0zqTSLxVJ1s0pQwK+8cUMuk9WJRFqNBvZbU12t6e5etCAKZICeGhJCovmTrxcV2W22c5kc2LJSoSjk8212e0tzi88kL5PJBEGsWLasTCiEdPX29lqGhtQdqu8PHd6WkFAqLMnj5UKK5FLZ1cKrsKrRaGA3EB9gSWw6A/YSEhAYwGBOCQoOZgcEsdjvBgaBh0WjBzJYMA1kMMEPHhDAEoxAJiuAzghmscEAPwwQgB8EMCDJgP0LTPG7Ie3w1aYAAAAASUVORK5CYII="
                
),
                array(
                    
"title" => "Tech Republic",
                    
"url" => dirname(__FILE__)."/techrepublic.xml",
                    
"logo" => "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/2wBDAQMEBAUEBQkFBQkUDQsNFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBT/wgARCAAeAB4DAREAAhEBAxEB/8QAGQAAAwADAAAAAAAAAAAAAAAABAYHAAUI/8QAGAEBAQEBAQAAAA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YqLC4wMTM1Nzw+P0FDSEpLTVJUV1laXF1hZGhqa21udHZ5enx9f4CBg4aHiIuMjpCSk5SWl5iZm5ydoqSmp6iqq66vsLO4uru8vb6/wMHCw8TFxsfIysvMzs/Q0NHS09XV1tfX2Nna29zd3t/g4eLj5OXm5+fo6uvs7e7v8PP09vf4+fr7/Pz9/f3+ct8a8wAAAlZJREFUeAFdzvtbWgUAxvFvcoFEwgFOZW1dWratO1mryJZrVrNlszZrTTZwqxHLrCzJOSbnSGSpoCUGBp6X/7QDRomfX9/n+T4v//EMJ7OF31YLy1+92cNhj1wz7rwVcYGz/2zSuBGmQ2z9Cx8vXDeKpZVE1OG+snGBA5LmoCdZ0b/+TgeC92a7aJu9y2hVB9QnXYlFJ/tuprmpTtUXSX5Hy1mTW+r0Zy+Q+QBbYGPgdatWKUvlSs2y9naq0mVsoeIgcC1OuP9I/8la/clgoC8cilyVPqfp4yR48yFs31uSVQTCFUnbbuiKevJBhlPez4BLanoFWJftE+Db0Mx73I69ZB2BkCXbPDAu214Iti4+P8/ywLTeBXKyVX0w2JBtEldtqduk4DCVB0bUdB5Yk83gtLbIskpJVgT8ddmW2jfWmFGZTGvWFGDINg70WZJ+YltlfrbjeekP4G1JtRPPAgVJ506qFc/1zUh6Gvy70oPTWw/BhGT1pKSM1yT12suSbgMZaWRaQ3DU0u9UpQunFnjjVlddqnhhRNaxHcWBXzTxjGT5r3+EL+9MS3oVehu556SyE8Z0/Gspx8pRuPGp35J+BMzzCUlROF4KVNV49J07QLgYGJfqvXDmib8kLYJrKCZNOYonsI3eY1Z6HxiWbdcHZPWA9CQt38SZ0yawpKZzEGyYXL3PPsdigsu1IXy7avoVYtNMGd2097kF37GnGNW+x8Bz9/7D/O/D4oSbUz+UtsubC2NO98WNK3SIJMwvoz3Yus/EjdTjHBYamzOymUzWmL80QNs/vikHPQvCA1wAAAAASUVORK5CYII="
                
)
            )
        );
    foreach(
$newsSource as $column) {
        
$html .= '<div class="col-md-4">';
        foreach (
$column as $source) {
            
$html .= '<h2><img class="feed_logo" alt="'.$source["title"].'" src="'.$source["logo"].'" />'.$source["title"].'</h2>';
            
$html .= getFeed($source["url"]);
        }
        
$html .= '</div>';
    }
    return 
$html;
}

function 
getFeed($url){
    
$html "";
    
$rss simplexml_load_string(file_get_contents($url));
    if(empty(
$count)) $count 0;
    
$html .= '<ul>';
    foreach(
$rss->channel->item as $item) {
        
$count++;
        
# 7 articles should be enough
        
if($count && $url != dirname(__FILE__)."/youtrack.xml" ){
            break;
        }
        
/* this is a custom if function
         * specifically for my mcrides
         * comments, to ake them pretty.
         * The general public won't need it.
         */
        
if($url == dirname(__FILE__)."/mcrides_comments.xml") {
            
$dc $item->children('http://purl.org/dc/elements/1.1/');
            
$cnames explode(" ", (string) $dc->creator);
            
$creator=$cnames[0];
            
$title=$creator." wrote: ".trim(preg_replace('/\s\s+/'' 'substr(strip_tags($item->description), 050)))."... ";
            
$description=substr($item->pubDate016);
        } else {
            
$title=htmlspecialchars($item->title);
            
$description=trim(preg_replace('/\s\s+/'' 'substr(strip_tags($item->description), 0150)));
        }
        
$html .= '<li><a data-toggle="tooltip" title="'.$description.' ..." target="_blank" href="'.htmlspecialchars($item->link).'">'.$title.'</a></li>';
    }
    if(
$count==0) {
        
$html .= '<li class="bg-danger">Uh-oh, something went wrong, and no XML elements were found.<br />Try again in 15 minutes, or check <a href="'.$_SERVER["PHP_SELF"].'?src=1#thebash">the BASH</a> code is working as expected.</li>';
    }
    
$html .= '</ul>';
    return 
$html;
}

if(isset(
$_GET["src"]) && ($_GET["src"]==1)) {
?>
    <div class="documentation">
    <nav class="navbar navbar-default">
      <div class="container-fluid">
        <ul class="nav navbar-nav">
          <li><a href="#thedocs">Written documentation</a></li>
          <li><a href="#thephp">PHP Code</a></li>
          <li><a href="#thebash">BASH Code</a></li>
        </ul>
      </div>
    </nav>
    <h3 class="headline"><a id="thedocs"></a>Documentation</h3>
        <h4 class="sub-heading">References</h4>
        <div class="clearfix"></div>
        Things used in this code:
        <ul>
            <li>Code written by <a target="_blank" href="https://www.alexkras.com/simple-rss-reader-in-85-lines-of-php/">Alex Kras</a></li>
            <li>Code written by <a target="_blank" href="https://davidwalsh.name/php-cache-function">David Walsh</a></li>
            <li>xsltproc - <a target="_blank" href="http://xmlsoft.org/XSLT/xsltproc.html">http://xmlsoft.org/XSLT/xsltproc.html</a></li>
            <li>atom2rss.xsl - <a target="_blank" href="https://github.com/pornel/atom2rss">https://github.com/pornel/atom2rss</a></li>
            <li>wget</li>
            <li>php-xml</li>
        </ul>
        All files required to get this running:
        <ul>
            <li>This index.php file. You can copy the entire source contents from the <a href="#thephp">PHP Code</a> section.</li>
            <li>The <a href="#thebash">BASH Code</a>. Which can be downloaded from <a href="wget_rss_feeds.sh">here</a>.</li>
            <li>The XSL style sheet. <a href="atom2rss.xsl">Here</a> is my version. You can get the original from <a target="_blank" href="https://github.com/pornel/atom2rss">https://github.com/pornel/atom2rss</a>.
        </ul>
        <h4 class="sub-heading">Preparation</h4>
        <div class="clearfix"></div>
        <p>
        Firstly install the necessary packages. I'm a debian user, so I do this:<br />
        &nbsp; &nbsp; <kbd>aptitude install xsltproc wget php-xml</kbd><br />
        Depending on your version of php, you may need to install some similar php-xml library.
        </p>
        <h4 class="sub-heading">A guide to the code</h4>
        <div class="clearfix"></div>
        <h5 class="minor-heading">The Array</h5>
        <p>
        In the <a href="#thephp">PHP Code</a> I build a multi-dimensional array of all my feeds, which incluldes the title, url, and icon.<br />
        The array is sectioned into column1, column2, column3, with arrays of feeds inside them. <br />
        </p>
        <h5 class="minor-heading">The icons</h5>
        <p>
        I used <a target="_blank" href="http://b64.io/">http://b64.io/</a> to base64 all my images. You can use what ever method you want, or you can use regular images on the filesystem.<br />
        The "logo" image (the cartoon Paul Willard), is 50x50 pixels, the feed icons are 30x30 pixels.<br />
        </p>
        <h5 class="minor-heading">The caching</h5>
        <p>
        I cache the feeds in feed-cache.txt so that when I am downloading new rss feeds in to the xml files, the PHP will <em>probably</em> still be reading from the cache, so I shouldn't get funky half finished xml files. <br />
        </p>
        <h5 class="minor-heading">Speeding up load times</h5>
        <p>
        I loaded the bootstrap.min.css inline to speed load times. This is probably not necessary. <br />
        The external Javascript files (bootstrap.min.js and jquery.min.js) are loaded asyncronously ( &lt;script async src=" ) to speed up load times.<br />
        &nbsp; &nbsp; <span class="bg-info">Update: I've added a "back to top" button, now I can't load jquery asyncronously :( </span><br />
        I host local copies of jquery.min.js, bootstrap.min.js, and bootstrap.min.css as I am in New Zealand, and international CDNs actually <strong>slow things down</strong> here.<br />
        In New Zealand it is quicker to download these from my server (which is based in New Zealand).
        </p>
        <h5 class="minor-heading">Cron</h5>
        <p>
        In the <a href="#thebash">BASH Code</a> I have defined PWD as the installation path. You will need to change this in the bash code to your path.<br />
        You will also need write access for the webserver user (in my case www-data) to the directory where this will run. This is because it writes a file (feed-cache.txt), and the CRON job will write xml files. <br />
        I placed my CRON job in /etc/crontab, and is documented in the <a href="#thebash">BASH Code</a>. You can alternatively install in to a user crontab.<br />
        &nbsp; &nbsp; <kbd>crontab -e</kbd><br />
        </p>
        <h3 class="headline"><a id="thephp"></a>PHP Code</h3>
        Place this in a webserver writable directory. See the <a href="#thedocs">written documentation</a> about which files will be written.<br />
        <pre>
<?php
    highlight_file
("index.php");
?>
        </pre>
        <h3 class="headline"><a id="thebash"></a>BASH Code</h3>
        Make this file executable <br /><kbd>chmod a+x /path/to/file.sh</kbd>.<br />
        Add to CRON. see the <a href="#thedocs">written documentation</a> about adding to CRON.<br />
        <pre>
<?php
    highlight_file
("wget_rss_feeds.sh");
?>
        </pre>
    </div>
<?php
} else {
    print 
getContent();
}
?>
            </div> <!-- end row -->
        </div>
        <a id="back-to-top" href="#" class="btn btn-primary btn-lg back-to-top" role="button" title="Click to return on the top page" data-toggle="tooltip" data-placement="left">&uArr; Top</a>
    <!-- calendar js -->
    <script type="text/javascript" src="calendar/components/underscore/underscore-min.js"></script>
    <script type="text/javascript" src="calendar/components/jstimezonedetect/jstz.min.js"></script>
    <script type="text/javascript" src="calendar/js/calendar.js"></script>
    <script type="text/javascript" src="calendar/js/embed_week.js"></script>

<!-- weather -->
<div class="container-fluid">
    <div class="modal fade" id="weatherModal" tabindex="-1" role="dialog" aria-labelledby="weatherModalLabel" aria-hidden="true">
      <div class="modal-dialog modal-lg" style="max-width: 100% !important" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <h5 class="modal-title" id="lweatherModalLabel">Weather Map</h5>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">×</span>
            </button>
          </div>
          <div class="modal-body">
          <iframe id="weatherframe" src="https://www.mcrides.co.nz/errorpages/weather.html"></iframe>
          <!-- <iframe id="weatherframe" src="https://embed.windy.com/embed2.html?lat=-40.413&lon=177.                                                                       034&zoom=6&level=surface&overlay=rain&menu=&message=&marker=&calendar=24&pressure=&type=map&location=coordinates&detail=true&detailLat=-38.013&detailLon=175. 518&metricWind=km%2Fh&metricTemp=%C2%B0C&radarRange=-1" frameborder="0"></iframe> -->
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
          </div>
        </div>
      </div>
    </div>
</div>
<!-- end weather -->

    </body>
</html>

BASH Code

Make this file executable
chmod a+x /path/to/file.sh.
Add to CRON. see the written documentation about adding to CRON.

#!/bin/bash
#change the path to suit your needs
PWD=/var/www/html/home.paulwillard.nz

# add in to CRON to auto update in the background
#          */15    *   * * *   www-data    /var/www/html/home.paulwillard.nz/wget_rss_feeds.sh

wget --quiet -O $PWD/nzherald.xml http://rss.nzherald.co.nz/rss/xml/nzhtsrsscid_000000698.xml
wget --quiet -O $PWD/stuff.xml http://www.stuff.co.nz/rss/
wget --quiet -O $PWD/theregister.xml http://www.theregister.co.uk/headlines.rss
wget --quiet -O $PWD/wordpress.xml http://wordpress.org/news/feed/
wget --quiet -O $PWD/mub.xml https://mandrivausers.org/index.php?/discover/all.xml/
wget --quiet -O $PWD/mcrides.xml https://www.mcrides.co.nz/latest.rss
wget --quiet -O $PWD/mcrides_comments.xml https://www.mcrides.co.nz/posts.rss
wget --quiet -O $PWD/kiwibiker.xml http://www.kiwibiker.co.nz/forums/external.php?type=RSS2
wget --quiet -O $PWD/svportal.xml http://www.sv-portal.com/forums/external.php?type=RSS2
wget --quiet -O $PWD/computerworld.xml https://www.computerworld.co.nz/rss/location/australia/
wget --quiet -O $PWD/google_local.xml "https://news.google.com/news/rss/?ned=nz&hl=en-NZ"
wget --quiet -O $PWD/rnz_national.xml "http://www.radionz.co.nz/rss/national.xml"
wget --quiet -O $PWD/techrepublic.xml "https://www.techrepublic.com/rssfeeds/articles/?feedType=rssfeeds&sort=latest"

# use xsltproc and atom2rss.xsl to convert Atom to RSS
# wget --quiet -O $PWD/dynaclub.atom https://www.dynaclub.nz/app.php/feed
# /usr/bin/xsltproc $PWD/atom2rss.xsl $PWD/dynaclub.atom > $PWD/dynaclub.xml 2> /dev/null


/usr/bin/php $PWD/index.php > /dev/null 2>&1
⇑ Top