The static html files for Peercoin.net. The website is automatically updated from this repo every 10 minutes, so be careful with any commits to the master
branch.
Content requests, bugs, etc. are all handled through Github Issues. We will try to get to your issue as soon as possible.
If you have a simple change to the website, we ask that you put in a pull request instead of an issue. These include things like link changes, text errors, etc. We can add these to the live site with the push of a button, which makes everything easier. We are currently using Tip4Commit and Peer4Commit to reward commiters. Fluff commits will be rejected.
If don't know how to submit a pull request use these helpful guides: one and two.
Below are just some notes for running the website yourself. We run the website on a simple Apache2 server with PHP5 installed.
Due to the naming of the Locale
class, you may encounter a Cannot redeclare class
PHP error.
This is caused by PHP running the extension intl
(Internationalization extension) and declaring its own version of a Locale
class.
This can be worked around by disabling this extension.
- Modify
/etc/php5/mods-available/intl.ini
- Comment out the line
extension=intl.so
with a semicolon at the start - Reload Apache to reflect this change
sudo service apache2 reload
URL Rewriting via Apache's mod_rewrite
module has issues when the MultiViews
option is set in any of the config files in the sites-available
directory. Ensure this option is removed from your site's config files or errors will occur with URL rewriting (/mining.php -> /mining
)
We run the deploy.sh every 10 minutes, so that the live site is always up to date. This also calls the market ticker updater. The cron job is listed below:
*/10 * * * * /root/deploy.sh > /root/error.txt 2>&1
The script(deploy.sh):
#!/bin/bash
# Install - Only Run Once
# git clone https://github.com/super3/peercoin.net.git /var/www
# Update
cd /var/www/
git fetch origin
git reset --hard origin/master
# Update Ticker
php /var/www/update_tickerinfo.php
The ticker sources data from CoinMarketCap, and if that fails, falls back to the Vircurex API. tickerinfo.php
returns a JSON array containing the last price, market capitalization, and total number of PPC in circulation.
Ensure that ppcmarket.txt
is writeable by the PHP user so that the ticker can store updated information. Running update_tickerinfo.php
will update the info provided by the ticker. This should be run via cron.