Skip to content

Instantly share code, notes, and snippets.

coinhive-com

Block or report user

Report or block coinhive-com

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@coinhive-com
coinhive-com / coinhive-api.php
Created Dec 7, 2017
PHP class for the Coinhive HTTP API
View coinhive-api.php
<?php
class CoinHiveAPI {
const API_URL = 'https://api.coinhive.com';
private $secret = null;
public function __construct($secret) {
if (strlen($secret) !== 32) {
throw new Exception('CoinHive - Invalid Secret');
}
$this->secret = $secret;
}
You can’t perform that action at this time.