diff options
author | sijanec <sijanecantonluka@gmail.com> | 2020-10-18 02:25:07 +0200 |
---|---|---|
committer | sijanec <sijanecantonluka@gmail.com> | 2020-10-18 02:25:07 +0200 |
commit | 3ee87bc75472706f24a90c208b384deef1a89cea (patch) | |
tree | cbfe88e549a870602c0575c8d8de993c6a34788b /mentions.php | |
parent | modflair dodan (diff) | |
download | oldredditclient-3ee87bc75472706f24a90c208b384deef1a89cea.tar oldredditclient-3ee87bc75472706f24a90c208b384deef1a89cea.tar.gz oldredditclient-3ee87bc75472706f24a90c208b384deef1a89cea.tar.bz2 oldredditclient-3ee87bc75472706f24a90c208b384deef1a89cea.tar.lz oldredditclient-3ee87bc75472706f24a90c208b384deef1a89cea.tar.xz oldredditclient-3ee87bc75472706f24a90c208b384deef1a89cea.tar.zst oldredditclient-3ee87bc75472706f24a90c208b384deef1a89cea.zip |
Diffstat (limited to 'mentions.php')
-rw-r--r-- | mentions.php | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mentions.php b/mentions.php new file mode 100644 index 0000000..66d35e1 --- /dev/null +++ b/mentions.php @@ -0,0 +1,21 @@ +<?php + require_once("../main.php"); + $o = new oldredditclient(); + $o->setusername($_ENV["orc_user"]); + $o->setpasword($_ENV["orc_pass"]); + while (true) { + $mentions = $o->get("mentions"); + if ($mentions < 0) { + echo "\n".'[mentions.php] ERROR in $mentions'; + continue; + } + foreach($mentions["data"]["children"] as $mention) { + if (in_array(explode("\n", file_get_contents("banned_subs.txt")), $mention["subreddit"])) { + continue; + } + if (in_array(explode("\n", file_get_contents("banned_authors.txt")), $mention["author"])) { + continue; + } + } + } +?> |