Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <title>Panel Pedia</title>
- <h2>Script Panel Pedia COK</h2>
- <form method="POST">
- <label>Game ID :</label>
- <input type="text" name="game_id" value=""><br>
- <label>Item Name :</label>
- <input type="text" name="nama_item" value=""><br>
- <label>Username :</label>
- <input type="text" name="username" value=""><br>
- <label>Password :</label>
- <input type="text" name="password" value=""><br>
- <input type="submit" value="Submit"><br><br>
- </form>
- <?php
- if(isset($_POST['game_id'])){
- $GameID1 = $_POST['game_id'];
- $ItemName1 = $_POST['nama_item'];
- $Username1 = $_POST['username'];
- $Password1 = $_POST['password'];
- class XFilesAPI
- {
- public $LastMsg;
- public $ApiURL;
- public $AccessToken;
- public $MyName;
- public $MyCredit;
- public function __construct($ApiURL){
- $this->ApiURL = $ApiURL;
- }
- public function CheckAPIStatus()
- {
- if(empty($this->AccessToken)) {
- $this->LastMsg = "Access Token invalid!";
- return false;
- }
- return true;
- }
- public function SendRequest($data)
- {
- $ch = curl_init();
- curl_setopt($ch, CURLOPT_URL,$this->ApiURL);
- curl_setopt($ch, CURLOPT_POST, 1);
- curl_setopt($ch, CURLOPT_POSTFIELDS,"query=$data");
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
- $server_output = curl_exec ($ch);
- curl_close ($ch);
- return json_decode($server_output,true);
- }
- public function SetAccessToken($MyAccessToken){
- $query = array();
- $query[0] = $MyAccessToken;
- $query[1] = "at_check";
- $query = implode("@",$query);
- $result = $this->SendRequest($query);
- if($result['success'] == true){
- $this->AccessToken = $MyAccessToken;
- $this->MyName = $result['data']['Name'];
- $this->MyCredit = $result['data']['Credit'];
- return true;
- }
- $this->LastMsg = $result['msg'];
- return false;
- }
- public function XFilesHackAddMember($GameID,$ItemName,$Username,$Password,$ClientCount)
- {
- if(!$this->CheckAPIStatus())return false;
- $query = array();
- $query [0] = $this->AccessToken;
- $query [1] = "xfh_register_member";
- $query [2] = $GameID;
- $query [3] = $ItemName;
- $query [4] = $Username;
- $query [5] = $Password;
- $query [6] = $ClientCount;
- $query = implode("@",$query);
- $result = $this->SendRequest($query);
- if($result['success'] == true){
- if($this->SetAccessToken($this->AccessToken)){
- $this->LastMsg = $result['msg'];
- return $result['data'];
- }
- }
- $this->LastMsg = $result['msg'];
- return false;
- }
- }
- $XFiles = new XFilesAPI("https://www.xfileshack.net/WebTools/tools/api.php");
- $result = $XFiles->SetAccessToken("EAAXalPCEhzABAB94zbHjhtOKfTMSG9XO4GfeFT4yscGNjjZAZCOKHaFp3zjzCVvkCqbuiBbvkRTCyr77hBS4zMPKjAPev95DRUutkhL5GZAp9yFJHvlzFnSZA9Mz0i3pCvpGZA3XY5ZBwhvpahSAIQN7nvhcP98im1u5A6hxGRnAZDZD");
- if($result == true){
- echo "Initialize Success<br><br>";
- /*
- Contoh
- $result = $XFiles->XFilesHackAddMember("XFHPB","XFHPB-P7","USER","PASS",1);
- XFHPB -> Game ID
- XFHPB-P7 -> Nama Item
- USER -> Username untuk login di UserCP
- PASS -> Password untuk login di UserCP
- 1 -> Client Count (Jumlah Client), jika memilih paket Warnet, client count akan di ambil dari value ini, jika personal client count tetap 1
- */
- $result = $XFiles->XFilesHackAddMember("$GameID1","$ItemName1","$Username1","$Password1",1);
- if($result != false){
- echo "ServerMSG : ".$XFiles->LastMsg."<br>";
- echo "Username : ".$result['Username']."<br>";
- echo "Password : ".$result['Password']."<br>";
- echo "NewMember : ".$result['NewMember']."<br>";
- echo "OldExpiration : ".$result['OldExpiration']."<br>";
- echo "Expiration : ".$result['Expiration']."<br>";
- }
- else {
- echo "Register Member Gagal <br>";
- echo "ServerMSG : ".$XFiles->LastMsg;
- }
- } else die($XFiles->LastMsg);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement