Skip to content
PolyCash is a multi-currency blockchain platform for wallets, asset issuance, bonds & gaming.
Branch: master
Clone or download
joeyfrich Merge pull request #25 from PolyCash/separator_addresses
Separator addresses & linearly paid out events
Latest commit 79e0c18 Feb 26, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ajax Changes for asset tracking events & UTXOs. Feb 17, 2019
classes Pay out correctly for linear payout events. Feb 26, 2019
cron Improvements to installation & blockchain sync processes. Jan 26, 2019
css
images New logo & added links to header. Nov 29, 2018
includes
js
lib
modules
pages New whitepaper & tweaks to page template. Dec 1, 2018
scripts
sql
strategies
tests Added App->fetch_db_game_by_id function & removed 2 unnecessary scripts. Dec 2, 2018
webfonts
.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 Added App->fetch_db_game_by_id function & removed 2 unnecessary scripts. Dec 2, 2018
api.php Added functions to get transactions by ID & hash and add game blocks … Dec 5, 2018
api_client.php Made corrections to API for automated betting. Aug 20, 2017
cards.php
directory.php Moved some JS & CSS to end of page for performance. Nov 29, 2018
download.php Added categories & added admin LTE theme. Oct 2, 2017
explorer.php
favicon.ico Added new favicon.ico Nov 3, 2017
game_page.php Changes for asset tracking events & UTXOs. Feb 17, 2019
import_game.php Import group by file & set entities on import. Nov 20, 2018
index.php
install.php
manage_game.php
manage_groups.php
manage_profile.php Added password reset functionality. Jul 24, 2018
redeem_card.php Redirect to starting url after logging in from public pages. Jul 29, 2018
render_qr_code.php
reset_password.php Added categories & added admin LTE theme. Oct 2, 2017
rewrite.php
unsubscribe.php
wallet.php

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.