Skip to content
PolyCash is a multi-currency blockchain platform for wallets, asset issuance, bonds & gaming.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ajax Added Event.payout_rate field to enable fees which decrease total sup… Jun 13, 2019
classes Correction to accounts page JS error, show fee adjusted odds in explo… Jun 15, 2019
cron Added Event.payout_rate field to enable fees which decrease total sup… Jun 13, 2019
css
images Correction to unresolved bet sum & new logo. Jun 3, 2019
includes Added Game.public_players param to control if players on a shared nod… Jun 7, 2019
js Added Event.payout_rate field to enable fees which decrease total sup… Jun 13, 2019
lib Code style changes to scripts, ajax & modules. Jun 6, 2019
modules Number formatting changes & set fees to 0% in DailyCryptoMarkets. Jun 13, 2019
pages Added new logo to whitepaper. Jun 3, 2019
scripts Added Event.payout_rate field to enable fees which decrease total sup… Jun 13, 2019
sql Added Event.payout_rate field to enable fees which decrease total sup… Jun 13, 2019
strategies Handle event start and end times better in strategies. Jun 9, 2019
tests
webfonts Updated to new version of font-awesome. Anonymize player usernames. Feb 1, 2018
.htaccess Set char limits on usernames/passwords. Switched mt_rand to openssl_r… Aug 12, 2016
README.md Improvements to installation & blockchain sync processes. Jan 26, 2019
accounts.php Correction to accounts page JS error, show fee adjusted odds in explo… Jun 15, 2019
api.php
api_client.php Added functionality for syncing with a definitive peer. May 23, 2019
cards.php Link to TX hashes in strategy scripts & other corrections. Jun 6, 2019
directory.php
download.php Added functionality for syncing with a definitive peer. May 23, 2019
explorer.php Added Event.payout_rate field to enable fees which decrease total sup… Jun 13, 2019
favicon.ico Correction to unresolved bet sum & new logo. Jun 3, 2019
game_page.php Cache vote supply & pending bets for faster page loads. Jun 8, 2019
import_game.php Added functionality for syncing with a definitive peer. May 23, 2019
index.php Added pages system for home page. Aug 16, 2016
install.php Code style changes to scripts, ajax & modules. Jun 6, 2019
manage_game.php Added fee column to event import CSV template & show blocks to start … Jun 13, 2019
manage_groups.php Code style changes to scripts, ajax & modules. Jun 6, 2019
manage_profile.php Added password reset functionality. Jul 24, 2018
redeem_card.php Code style changes to scripts, ajax & modules. Jun 6, 2019
render_qr_code.php Changes to accounts UI. Jul 23, 2018
reset_password.php Code style changes to scripts, ajax & modules. Jun 6, 2019
rewrite.php Code style changes to scripts, ajax & modules. Jun 6, 2019
unsubscribe.php Code style changes to scripts, ajax & modules. Jun 6, 2019
wallet.php Added Event.payout_rate field to enable fees which decrease total sup… Jun 13, 2019

README.md

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'] = "polycash";

$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['process_lock_method'] = "db";

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

$GLOBALS['pageview_tracking_enabled'] = false;

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

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

$GLOBALS['coin_brand_name'] = "PolyCash";
$GLOBALS['site_name_short'] = "PolyCash";
$GLOBALS['site_name'] = "Poly.Cash";
$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['navbar_icon_path'] = "";

$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 polycash every minute. This keeps PolyCash in sync at all times. Add this line to your /etc/crontab:

* * * * * root /usr/bin/php /var/www/html/polycash/cron/minutely.php

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 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 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 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, PolyCash 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.

Make sure you have curl installed:

apt-get install php-curl

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

Or run this command:

a2enmod rewrite
You can’t perform that action at this time.