Skip to content

o-shabashov/wallswap-yii2

Repository files navigation

Wallswap-Yii2

BCH compliance

The project is just for fun and test programming skills. It consists of two parts - the server and crawler.

Server:

  1. Runs on 8080 port;
  2. Gets the list of wallpapers from database;
  3. Render the html page with the list of wallpaper;
  4. Allows you to authenticate the user through OAuth2 Dropbox, gets access_token and stores the user in a database;

Crawler:

  1. Parses website https://wallhaven.cc and collects direct URL's at the wallpaper;
  2. Saves list of wallpapers in the database;
  3. Upload wallpapers for each user in Dropbox directory.

Installation

  • Create MySQL database wallswap and import wallswap.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

Made with

  1. Yii2
  2. MySQL
  3. league/flysystem-dropbox
  4. kunalvarma05/dropbox-php-sdk
  5. ivkos/wallhaven

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published