summaryrefslogtreecommitdiffstats
path: root/public/postload.php
diff options
context:
space:
mode:
Diffstat (limited to 'public/postload.php')
-rw-r--r--public/postload.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/public/postload.php b/public/postload.php
new file mode 100644
index 0000000..69d6571
--- /dev/null
+++ b/public/postload.php
@@ -0,0 +1,28 @@
+<?php
+
+require_once '../app/app.php';
+
+if (!$PlanetConfig::isInstalled()) {
+ die();
+}
+
+$xml = new SimpleXMLElement(file_get_contents($PlanetConfig->getOpmlFile()));
+
+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(__DIR__ . '/custom/img/feed.png');
+ die();
+ }
+}
+
+echo 'Updating this URL is not allowed.';