Backups Created:
/home/japatmex/public_html/wp-content/edit-wolf.php
Savvy
W
olf -
MANAGER
Edit File: chimeratoolapi.php
<?php class ChimeraApi { const URL = "https://chimeratool.com/rapi/"; private $username; private $key; private $url; public function __construct($username=null, $key=null, $url=null){ $this->username = $username; $this->key = $key; $this->url = $url; } private function sendCmd($cmd, $params=array(), $apiKey = null, $userName = null, $url = null) { // $params['username'] = $userName; // $params['apikey'] = $apiKey; if($apiKey == null) { $apiKey = $this->key; } if($userName == null) { $userName = $this->username; } if($url == null) { $url = $this->url; } $params['username'] = $userName; $params['apikey'] = $apiKey; //$url = $this->url; foreach($params as $key => $value) $up[] = $key."=".urlencode($value); if(substr($url, -1)!= "/") $url .= "/"; //$r = file_get_contents(self::$url . $cmd . "?" . join("&", $up)); $r = @file_get_contents(self::URL . $cmd . "?" . join("&", $up)); //var_dump($r); if($r === false) return array("success" => false, "code" => "000", "message" => "Couldn't connect to API!"); if(empty($r)) return array("success" => false, "code" => "001", "message" => "No response from API server!"); return json_decode($r, true); } public function setSettings($key, $username, $url) { $this->username = $username; $this->key = $key; $this->url = $url; } public function getTransferList($page = 1, $limit = 50) { return $this->sendCmd("list",array('page' => $page, 'limit' => $limit)); } public function getInfo($apiKey, $userName, $url) { return $this->sendCmd("info", array(), $apiKey, $userName, $url); } public function transferCredit($userId, $amount) { return $this->sendCmd("transfer",array('userId' => $userId, 'amount' => $amount)); } public function revokeTransfer($transferId) { return $this->sendCmd("revoke",array('transferId' => $transferId)); } public function checkUser($username, $email) { return $this->sendCmd("checkuser", array('user' => $username, 'email' => $email)); } public function checkChimeraCard($serialnumber) { return $this->sendCmd("checkuser", array('serialnumber' => $serialnumber)); } public function sellLicence($targetid, $targettype, $licencename) { return $this->sendCmd("selllicence", array('targetid' => $targetid, 'targettype' => $targettype, 'licencename' => $licencename)); } public function extendLicence($userlicenceid) { return $this->sendCmd("extendlicence", array('userlicenceid' => $userlicenceid)); } public function upgradeLicence($username, $email) { return $this->sendCmd("upgradelicence", array('userlicenceid' => $userlicenceid)); } public function availableLicences($apiKey, $userName, $url) { return $this->sendCmd("availableLicences", array(), $apiKey, $userName, $url); } public function getSoldLicenceList($page = 1, $limit = 50) { return $this->sendCmd("listsoldlicences", array('page' => $page, 'limit' => $limit)); } public function revokeLicence($actionId) { return $this->sendCmd("revokelicence", array('actionId' => $actionId)); } public function checkUserLicences($username, $email) { return $this->sendCmd("checkUserLicences", array('userlicenceid' => $userlicenceid)); } }