Giter Site home page Giter Site logo

dbd5 / adserver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from greenrobotllc/adserver

0.0 2.0 0.0 22.55 MB

Intelligently rotate AdSense/AdMob, LifeStreetMedia, and other networks & make more money. GreenRobot Ad Server is an API enabled yield optimization system for publishers of websites and mobile apps written using PHP Laravel 5.7.

Home Page: https://greenrobot.com

License: GNU General Public License v3.0

Dockerfile 0.01% PHP 5.18% JavaScript 46.63% CSS 10.31% HTML 37.87% Shell 0.01%

adserver's Introduction

GreenRobot Open-source Adserver

This adserver rotates banner ads between AdSense/AdMob, LifeStreetmedia, and others based on RPM. For AdSense/AdMob and Lifestreetmedia, the RPM is automatically retrieved by the server using network APIs, for other networks you will have to edit the RPM yourself.

This adserver is for desktop sites and mobile web, as well as native mobile apps. Specifically, I use it on a Facebook app, which is also accessible outside of the Facebook frame once you're logged in via Facebook connect. It should also work fine on desktop or mobile web sites not using Facebook login. For mobile apps, I have made some code available to work with the adserver. I am still working on this, including adding documentation.

For iOS: https://github.com/greenrobotllc/adserver-ios-sdk

For Android: https://github.com/greenrobotllc/adserver-android-sdk

Screenshot 1 Screenshot 2 Screenshot 3 Screenshot 4 Screenshot 5

Requirements:

I recommend using Linux or Mac OS X. I have not tried this under Windows. For production/linux, I have it deployed to a Centos server on Linode and it's running currently. For development, I used Mac OS X with Laravel Homestead development environment. I later switched to Laradock.

Steps to install:

  1. You must use PHP 7.1 or greater. Make a new folder to put the code:
    mkdir adserver

  2. Git clone the adserver code from Github: https://github.com/greenrobotllc/adserver:
    cd adserver; git clone https://github.com/greenrobotllc/adserver .

  3. Change your username and password from the default:
    Edit database/seeds/UsersTableSeeder.php with your email and password. I would like if someone were to make this part easier.

  4. In the project folder, move .env.example to .env and fill in your database credentials:
    cp .env.example .env

  5. Create the adserver database. I used Sequel Pro on Mac OS X.

  6. Run php composer to install the components:
    php composer.phar install --no-scripts
    mkdir bootstrap/cache
    php composer.phar install

  7. Migrate the database. Run:
    php artisan migrate
    php artisan db:seed

  8. Reset the cached config files:
    php artisan key:generate
    php artisan config:cache
    php artisan config:clear

  9. Laradock deployment:

  10. If you want to deploy the adserver with laradock, run the following to install the git submodule:
    git submodule update --init --recursive

  11. Enter the laradock folder and rename env-example to .env.
    cd laradock; cp env-example .env

  12. Change your database credentials in the laradock .env to match that of the adserver .env file.

  13. Run your containers:
    docker-compose down
    docker-compose up -d nginx mysql

  14. Open up http://localhost in your web browser

--More instructions available at https://laradock.io/

  1. Setup something like the following in cron (your path to artisan may vary):
    * * * * * php /var/www/html/adserver/artisan schedule:run >> /dev/null 2>&1

  2. Login with your email and password and setup your Google Client secrets, Google Account Info and LifeStreetMedia account info.

FAQ: What is the route I am suppose to provide for the Adsense Oauth Callback when setting up the google_clients_secrets.json? The route would be the address of your webserver. You should setup a domain or subdomain for it to work. For example: https://yoursubdomain.greenrobot.com/refresh

Developer Notes

Note for developers: I have set debug to false in config/app.php so this is ready to go for production installs. If you wish to debug, set this value to true. Setting it to true may cause your database password to be exposed if a connection error occurs.

Contact / Security Bugs

You can use Github issues for regular bugs and feature requests. For security issues or if you have any questions you don't want to discuss publicly you can email me: [email protected]

Facebook Discussion Group

Join the discussion on Facebook about GreenRobot Adserver: https://www.facebook.com/groups/greenrobotadserver/

Twitter Updates

Follow GreenRobot Adserver on Twitter: https://twitter.com/GRAdserver

TODO

-Document iOS & Android sdk integration

-I would like to add Facebook Audience network to this adserver.

Contributing

We take openness and inclusivity very seriously. To that end we have adopted the following code of conduct.

Contributor Code of Conduct

adserver's People

Contributors

andytriboletti avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.