summaryrefslogtreecommitdiffstats
path: root/postload.php
blob: 943a84ec3c769d0856481c9f43c0d0bd2357dc37 (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
31
<?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'])
    {
        $Planet->addPerson(
            new PlanetFeed(
                '',
                $_GET['url'],
                '',
                false
            )
        );

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

echo 'Updating this URL is not allowed.';