Backups Created:
/home/japatmex/public_html/wp-content/edit-wolf.php
Savvy
W
olf -
MANAGER
Edit File: gsmhub.class.php
<?php if (!extension_loaded('curl')) { trigger_error('cURL extension not installed', E_USER_ERROR); } class SAMKEYFusion { var $xmlData; var $xmlResult; var $debug; var $action; function __construct() { $this->xmlData = new DOMDocument(); } function getResult() { return $this->xmlResult; } function action($action, $apiKey, $userName, $url, $arr = array()) { if (is_string($action)) { if (is_array($arr)) { if (count($arr)) { $request = $this->xmlData->createElement("PARAMETERS"); $this->xmlData->appendChild($request); foreach ($arr as $key => $val) { $key = strtoupper($key); $request->appendChild($this->xmlData->createElement($key, $val)); } } $posted = array('username' => $userName, 'apiaccesskey' => $apiKey, 'action' => $action, 'requestformat' => 'JSON', 'parameters' => $this->xmlData->saveHTML()); $crul = curl_init(); curl_setopt($crul, CURLOPT_HEADER, false); curl_setopt($crul, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); curl_setopt($crul, CURLOPT_RETURNTRANSFER, true); curl_setopt($crul, CURLOPT_URL, $url . '/api'); curl_setopt($crul, CURLOPT_POST, true); curl_setopt($crul, CURLOPT_SSL_VERIFYPEER, false); curl_setopt($crul, CURLOPT_POSTFIELDS, $posted); $response = curl_exec($crul); if (curl_errno($crul) != CURLE_OK) { echo curl_error($crul); curl_close($crul); } else { curl_close($crul); return (json_decode($response, true)); } /* if (curl_errno($crul) != CURLE_OK) { echo curl_error($crul); curl_close($crul); } else { curl_close($crul); // $response = XMLtoARRAY(trim($response)); if ($this->debug) { echo "<textarea style='width:100%; height:300px;' > "; print_r($response); echo "</textarea>"; } return (json_decode($response, true)); }*/ } } return false; } } ?>