summaryrefslogtreecommitdiffstats
path: root/mentions.php
blob: 66d35e1ee37f43963f315fa6defcd843578ffb2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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;
			}
		}
	}
?>