Important statement: This website does not mine in background, only uses Proof of Work for external links (test and educational only).
The top in the cryptocurrency news is the websites like PirateBay and Showtime are placing miners on their sites.
Whether they are hacked or not, mining is a fever that takes everyone by surprise. Currently the option to mine from the visits of the best known website is: https://coinhive.com/
It is important before using this java code to read well the implications to add a miner on your website.
According to CoinHive web site they have some privacy “policies” that can cure certain illegalities:
We respect your privacy. We only keep track of the absolute minimum of information that is necessary to operate this service.
We keep your IP address on our servers in working memory (RAM) only. In case of a missbehaving client, the IP address will be kept in RAM for at most 48h. All other IP adresses are purged shortly after you disconnect from our servers.
We do not store your IP address.
We may use localStorage() to synchronize miners across multiple browser tabs. A random ID and timestamp is stored in the browser. This information never leaves the browser.
This Website (coinhive.com)
We do not track users. We do not use any third party tracking (Google Analytics, Piwik, …)
If you have a Coinhive account, your email address and password will be stored on our servers. This information never leaves our servers. We will not disclose your email address to any third party. Your account passwords are stored hashed and salted using bcrypt.
We record your IP address alongside your account information with each login into your Coinhive account. This is used to reproduce what happened in case your account was compromised. We will not disclose your IP address to any third party. IP adresses will be deleted after 30 days. Source: https://coinhive.com/info/privacy
Assuming that all of the “privacy” above is true, here’s how to add a miner to your WordPress website.
Download Wodpress Plugin:
Create a account in Coinhive:
Setting your web site key:
After creating the private key and publishes, place that private key in the settings of WordPress.
Save and go, you have a mincer on WordPress. The important thing is that your blog has time retention and therefore CoinHive is better if you have games online.
You can add a code on your page to use the Simple Miner UI just adding a code: