-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathreddit.php
More file actions
26 lines (24 loc) · 796 Bytes
/
reddit.php
File metadata and controls
26 lines (24 loc) · 796 Bytes
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
<?php
// ** More subreddits to check out: ** //
// ** iWallpaper ** //
// ** NSFW_Wallpapers ** //
// ** Offensive_Wallpapers ** //
# Settings:
include('class.reddit.php');
$reddit = new reddit(array('WQHD_Wallpaper', 'wallpapers'), 'RedditWallpaper', 'thisis4w3some');
$reddit->fileType = array('jpg', 'png');
$reddit->expiration = '1 year'; // php strtotime used
$reddit->saveDir = 'wallpaper';
$reddit->author = false;
$reddit->mininumUps = 20;
$reddit->minimumWidth = 1920;
$reddit->minimumHeight = 1080;
$reddit->maximumWidth = 2560;
$reddit->maximumHeight = 1440;
$reddit->scanSubreddits();
foreach ($reddit->data as $subreddits) {
foreach ($subreddits as $row) {
$reddit->saveWallpaper($reddit->validate($row));
}
}
$reddit->deleteExpiredWallpaper();