A Rest API to build a simple web app for boost to make money on your videos on youtube, vimeo, etc.
Not like a video tube as usual, this script is perfectly if you make website for posting a video movie.
reSlim-tuber is based on reSlim which is based on Slim Framework version 3.
This script is already tested, stable and free and I will not update in the future, so you have to fork this by yourself. There is no frontend UI, You have to create it by yourself.
omovv.com use this script >> visit
Reslim is already build with essentials of user management system in rest api way.
- User register, login and logout
- Auto generated token every login
- User can revoke all active token
- Every user can upload file to server
- There is a role for superuser, admin and member
- Auto clear current token when logout,user deleted or password was changed
- Change, reset, forgot password concept is very secure
- Mailer for sending email or contact form
- User can manage their API Keys
- Pagination json response
- Etc.
- Web server with URL rewriting
- Web server with mcrypt extension
- PHP 5.5 or newer
- Get or download the project
- Install it using Composer
Example Config.php
/**
* Configuration App
*
* @var $config['displayErrorDetails'] to display error details on slim
* @var $config['addContentLengthHeader'] to set the Content-Length header which makes Slim behave more predictably
* @var $config['limitLoadData'] to protect high request data load. Default is 1000.
* @var $config['enableApiKeys'] to protect api from guest or anonymous. Guest which don't have api key can not using this service. Default is true.
*
*/
$config['displayErrorDetails'] = true;
$config['addContentLengthHeader'] = false;
$config['limitLoadData'] = 1000;
$config['enableApiKeys'] = true;
/**
* Configuration PDO MySQL Database
*
* @var $config['db']['host'] = where is database was hosted
* @var $config['db']['user'] = username database to login
* @var $config['db']['pass'] = pass database to login
* @var $config['db']['dbname'] = the database name
*/
$config['db']['host'] = 'localhost';
$config['db']['user'] = 'root';
$config['db']['pass'] = 'root';
$config['db']['dbname'] = 'reSlim-tuber';
/**
* Configuration SMTP for Mailer
*
* @var $config['smtp']['host'] is smtp host. example smtp.gmail.com
* @var $config['smtp']['autotls'] is make smtp will send using tls protocol as default
* @var $config['smtp']['auth'] will connect to smtp using authentication
* @var $config['smtp']['secure'] this is type of smtp security. You can use tls or ssl
* @var $config['smtp']['port'] this is port smtp
* @var $config['smtp']['defaultnamefrom'] this is default name from. You can filled with yourname / yourwebsitetitle
* @var $config['smtp']['username'] your username to login into smtp server
* @var $config['smtp']['password'] the password to login into smtp server
* @var $config['smtp']['debug'] get more information by set debug.
* To work using rest api, You should set debug 1,
* because other than 1, there is special characters that will broke json format.
*/
$config['smtp']['host'] = 'smtp.gmail.com';
$config['smtp']['autotls'] = false;
$config['smtp']['auth'] = true;
$config['smtp']['secure'] = 'tls';
$config['smtp']['port'] = 587;
$config['smtp']['defaultnamefrom'] = 'reSlim-tuber admin';
$config['smtp']['username'] = 'youremail@gmail.com';
$config['smtp']['password'] = 'secret';
$config['smtp']['debug'] = 1;
// Configuration timezone
$config['reslim']['timezone'] = 'Asia/Jakarta';
I recommend you to use PostMan an add ons in Google Chrome to get Started with test.
- Import reSlim-tuber.sql in your database then config your database connection in config.php inside folder "reSlim-tuber/src/"
- Import file reSlim-tuber User.postman_collection.json in your PostMan.
- Edit the path in PostMan. Because the example test is using my path server which is my server is run in http://localhost:1337
The path to run reSlim-tuber is inside folder api.
Example for my case is: http://localhost:1337/reSlim-tuber/src/api/
In short, It's depend on your server configuration. - Then you can do the test by yourself
- Import reSlim-tuber.sql in your database then config your database connection in config.php inside folder "reSlim-tuber/src/"
- Edit the config.php inside folder "reSlim/test/example/backend"
$config['title'] = 'reSlim Tuber'; //Your title website
$config['keyword'] = 'Nonton, Streaming, online, film, movie, gratis, subtitle, indonesia'; //Your keyword website
$config['description'] = 'Nonton atau streaming online film gratis subtitle indonesia dan english'; //Your description website
$config['email'] = 'youremail@gmail.com'; //Your default email
$config['basepath'] = 'http://localhost:1337/reSlim-tuber/test/example/backend'; //Your folder backend website
$config['homepath'] = 'http://localhost:1337/reSlim-tuber/test/example'; //Your folder frontend website
$config['api'] = 'http://localhost:1337/reSlim-tuber/src/api'; //Your folder rest api
$config['apikey'] = ''; //Your api key, you can leave this blank and fill this later
$config['disqus'] = ''; //Your disqus username, you can leave this blank and fill this later
$config['sharethis'] = '598da1b6ea00a30012ce67a0'; //Your sharethis key, you can leave this blank and fill this later
$config['facebook'] = ''; //Your facebook page, you can leave this blank and fill this later
$config['twitter'] = ''; //Your twitter page, you can leave this blank and fill this later
$config['gplus'] = ''; Your google plus page, you can leave this blank and fill this later
$config['gpub'] = ''; //Your google publisher page, you can leave this blank and fill this later
$config['googleanalytics'] = ''; //Your google analytics, you can leave this blank and fill this later
$config['googlewebmaster'] = ''; //Your google webmaster, you can leave this blank and fill this later
$config['bingwebmaster'] = ''; //Your bing webmaster, you can leave this blank and fill this later
$config['yandexwebmaster'] = ''; //Your yandex webmaster, you can leave this blank and fill this later
$config['apidrive'] = ''; //Google Drive API, you can leave this blank and fill this later
$config['seopage'] = ''; //Keyword for dynamic page, you can leave this blank and fill this later
$config['seosite'] = ''; //Keyword for competitor site, you can leave this blank and fill this later - Visit yourserver/reSlim-tuber/test/example/backend
For my case is http://localhost:1337/reSlim-tuber/test/example/backend - You can login with default superuser account:
Username : reslim
Password : reslim - All is done
- Register account first
- Then You have to login to get the generated new token
The token is always generated new when You relogin and the token is will expired in 7 days as default.
If You logout or change password or delete user, the token will be clear automatically.
- Fork the reSlim-tuber repository
- Create a new branch for each feature or improvement
- Send a pull request from each feature branch to the develop branch