summaryrefslogtreecommitdiffstats
path: root/common/postload.php
blob: 7341b8261fb6cc0e390ea3d504c2d48ffd1fc77a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php

require_once __DIR__.'/app/app.php';

if (!is_installed()) {
    die();
}

$xml = new SimpleXMLElement(file_get_contents(custom_path('people.opml')));

foreach ($xml->xpath('/opml/body/outline[@xmlUrl]') as $element)
{
    if ($element->attributes()->xmlUrl == $_GET['url'])
    {
        $person = new PlanetFeed(
            '',
            $_GET['url'],
            '',
            false
        );
        $Planet->addPerson($person);

        $Planet->download(1);
        header('Content-type: image/png');
        readfile(custom_path('img/feed.png'));
        die();
    }
}

echo 'Updating this URL is not allowed.';