The project is just for fun and test programming skills. It consists of two parts - the server and crawler.
- Runs on 8080 port;
- Gets the list of wallpapers from database;
- Render the html page with the list of wallpaper;
- Allows you to authenticate the user through OAuth2 Dropbox, gets access_token and stores the user in a database;
- Parses website https://wallhaven.cc and collects direct URL's at the wallpaper;
- Saves list of wallpapers in the database;
- Upload wallpapers for each user in Dropbox directory.
- Create MySQL database
wallswap
and importwallswap.sql
- Create Dropbox App and fill
config/params.php
<?php
return [
'db_app_key' => 'APP_KEY_HERE',
'db_app_secret' => 'APP_SECRET_HERE',
];
- Redirect URL for Dropbox callback:
http://localhost:8080/oauth2callback
- Install composer dependencies:
composer global require "fxp/composer-asset-plugin:^1.2.0"
cd wallswap-yii2
composer update
- Run server:
./yii serve
- Run crawl once a week:
./yii console/run