summaryrefslogtreecommitdiffstats
path: root/bot
diff options
context:
space:
mode:
Diffstat (limited to 'bot')
-rw-r--r--bot/index.php22
-rwxr-xr-xbot/mentions.php3
-rw-r--r--bot/processed.txt1
3 files changed, 24 insertions, 2 deletions
diff --git a/bot/index.php b/bot/index.php
new file mode 100644
index 0000000..9fcf4a7
--- /dev/null
+++ b/bot/index.php
@@ -0,0 +1,22 @@
+<!DOCTYPE html>
+<html lang=en>
+ <head>
+ <meta charset=UTF-8 />
+ <meta name=viewport content="width=device-width,initial-scale=1.0" />
+ <title>
+ ImgLinkBot
+ </title>
+ <style>
+ body {
+ background-color: black;
+ }
+ </style>
+ </head>
+ <body>
+ <?php
+ foreach(explode(",", $_REQUEST["i"]) as $a) {
+ echo '<img src="https://i.redd.it/'.htmlspecialchars($a).'" />';
+ }
+ ?>
+ </body>
+</html>
diff --git a/bot/mentions.php b/bot/mentions.php
index 0b4345e..3b87abf 100755
--- a/bot/mentions.php
+++ b/bot/mentions.php
@@ -44,8 +44,9 @@
} else {
$imgs = "";
foreach ($post["data"]["media_metadata"] as $metadata) {
- $imgs .= get_string_between($metadata["s"]["u"], "dd.it/", "?width=");
+ $imgs .= get_string_between($metadata["s"]["u"], "dd.it/", "?width=").",";
}
+ $imgs = substr($imgs, 0, -1); // da odstranimo zadnjo vejico
$o->comment("[https://imglinkbot.ž.ga/?i=$imgs](https://imglinkbot.xn--jha.ga/?i=$imgs)$botsignature", $parent);
}
}
diff --git a/bot/processed.txt b/bot/processed.txt
index 4fde78b..e69de29 100644
--- a/bot/processed.txt
+++ b/bot/processed.txt
@@ -1 +0,0 @@
-g95m3jm