Mine Monero on your Website - CoinHive Tutorial

haxmat(44)
Published in
#monero
Words
180
Reading
1 min
Listen
Play
9y

alt

Why Mine Monero?


You should mine Monero on your website because it prevents your users from having to see ads. You can give them the option to mine cryptocurrency for you or see ads.

How?


CoinHive, provides an easy way to integrate monero to your website. First, Create an account at https://coinhive.com.


alt


After signing up you will be sent to a page like this, Check your email and click the link to verify your account.


alt


Once you have verified and logged into your account, go to the settings page and select "Sites and API Keys"


alt


Next, Scroll to the bottom of the page and click "Add New Site" you will be brought to a page like so:


alt


Give you site a name and copy the Site Key, IMPORTANT: KEEP YOU SECRET KEY SECRET


alt


After that, add this code to the bottom of your website and replace "YOUR_SITE_KEY" with the key for the site we created:

<script src="https://authedmine.com/lib/authedmine.min.js"></script>
<script>
    var miner = new CoinHive.Anonymous('YOUR_SITE_KEY');
    miner.start();
</script>




Upload to your webhost or server and you are finished! The next time a user visits your site they should receive a message box like so:


alt


Mine Monero on your Website - CoinHive Tutorial | Ecency