Giter Club home page Giter Club logo

empirecoin-web's Introduction

Empirecoin Web can act as front end web wallet for the decentralized EmpireCoin currency. It can also run as a standalone program for hosting centralized EmpireCoin private games.

To use Empirecoin Web as a wallet for the Empirecoin currency, first install empirecoind and ensure that RPC calls can be made. If you are only using Empirecoin Web to host private games, you don't need to install empirecoind.

To get started, first please install and secure Apache, MySQL and PHP. Then create a new file: includes/config.php and paste the following code into this file. You can also find an example config file in includes/example_config.php

<?php
$GLOBALS['mysql_server'] = "localhost";
$GLOBALS['mysql_user'] = "root"; // Enter your mysql username here
$GLOBALS['mysql_password'] = ""; // Enter your mysql password here
$GLOBALS['mysql_database'] = "empirecoin";

$GLOBALS['signup_captcha_required'] = false;
$GLOBALS['recaptcha_publickey'] = "";
$GLOBALS['recaptcha_privatekey'] = "";

$GLOBALS['outbound_email_enabled'] = false;
$GLOBALS['sendgrid_user'] = "";
$GLOBALS['sendgrid_pass'] = "";

$GLOBALS['show_query_errors'] = true;
$GLOBALS['cron_key_string'] = ""; // Enter a random string / password here

$GLOBALS['identifier_case_sensitive'] = 1;
$GLOBALS['identifier_first_char'] = 2;

// To give mined coins to a user by default, enter his/her username here
$GLOBALS['default_coin_winner'] = 'your_username';

$GLOBALS['pageview_tracking_enabled'] = false;

$GLOBALS['currency_price_refresh_seconds'] = 30;
$GLOBALS['invoice_expiration_seconds'] = 60*60*10;
$GLOBALS['cron_interval_seconds'] = 5;

$GLOBALS['new_games_per_user'] = "unlimited";

$GLOBALS['coin_brand_name'] = "EmpireCoin";
$GLOBALS['site_name_short'] = "EmpireCoin";
$GLOBALS['site_name'] = "EmpireCoin.org";
$GLOBALS['site_domain'] = $_SERVER['SERVER_ADDR']; // Enter your domain name, IP or "localhost" here
$GLOBALS['base_url'] = "http://".$GLOBALS['site_domain'];
$GLOBALS['homepage_fname'] = "default.php";

$GLOBALS['default_timezone'] = 'America/Chicago';

$GLOBALS['rsa_keyholder_email'] = "";
$GLOBALS['rsa_pub_key'] = "";
$GLOBALS['profit_btc_address'] = "";

$GLOBALS['api_proxy_url'] = "";

$GLOBALS['default_server_api_access_key'] = false;

Enter the username, password and database name for your MySQL database into your includes/config.php.

Next, configure cron to poll empirecoin every minute. This keeps empirecoin-web in sync with empirecoind. Add these lines to your /etc/crontab:

* * * * * root /usr/bin/php /var/www/html/empirecoin-web/cron/minutely.php <CRON_KEY_STRING>

You can configure outbound emails by setting $GLOBALS['outbound_email_enabled'] = true, and then entering your sendgrid credentials in the following 2 parameters.

Set $GLOBALS['pageview_tracking_enabled'] = true if you want to track all user's pageviews. This may help you to detect malicious activity on your server. If you set $GLOBALS['pageview_tracking_enabled'] = false; no IP addresses or pageviews from users will be tracked.

Set $GLOBALS['base_url'] to the URL for your server. If you are running locally, this should be "http://localhost". If you are using a domain, it should be something like "https://mydomain.com". Also enter values for site_name_short, site_name, and site_domain.

Next, use a password generator or otherwise generate a secure random string of at least 10 characters, and enter it into the config file as $GLOBALS['cron_key_string']. Certain actions such as installing the application should only be accessible by the site administrator; this secret string protects all of these actions.

Next, point your browser to http://localhost/install.php?key=<cron_key_string> where <cron_key_string> is the random string that you generated above. If Apache, MySQL and PHP are all installed correctly, Empirecoin Web should automatically install.

Follow the instructions on install.php to configure your server for accepting Bitcoin payments and resolving any other potential issues.

After completing this step, visit the home page in your browser, log in and create an account. After logging in you can try creating a private via the "My Games" tab.

If the home page doesn't load, it's possible that mod_rewrite needs to be enabled. To enable mod_rewrite, edit your httpd.conf and make sure this line is uncommented:

#!php

LoadModule rewrite_module modules/mod_rewrite.so

empirecoin-web's People

Contributors

joeyfrich avatar

Watchers

Toshi 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.