Advertisement
Guest User

Untitled

a guest
Jul 1st, 2016
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.79 KB | None | 0 0
  1. <title>Panel Pedia</title>
  2. <h2>Script Panel Pedia COK</h2>
  3. <form method="POST">
  4. <label>Game ID :</label>
  5. <input type="text" name="game_id" value=""><br>
  6. <label>Item Name :</label>
  7. <input type="text" name="nama_item" value=""><br>
  8. <label>Username :</label>
  9. <input type="text" name="username" value=""><br>
  10. <label>Password :</label>
  11. <input type="text" name="password" value=""><br>
  12. <input type="submit" value="Submit"><br><br>
  13. </form>
  14.  
  15.  
  16.  
  17. <?php
  18. if(isset($_POST['game_id'])){
  19.  
  20. $GameID1 = $_POST['game_id'];
  21. $ItemName1 = $_POST['nama_item'];
  22. $Username1 = $_POST['username'];
  23. $Password1 = $_POST['password'];
  24.  
  25. class XFilesAPI
  26. {
  27. public $LastMsg;
  28. public $ApiURL;
  29. public $AccessToken;
  30.  
  31. public $MyName;
  32. public $MyCredit;
  33.  
  34. public function __construct($ApiURL){
  35. $this->ApiURL = $ApiURL;
  36. }
  37. public function CheckAPIStatus()
  38. {
  39. if(empty($this->AccessToken)) {
  40. $this->LastMsg = "Access Token invalid!";
  41. return false;
  42. }
  43. return true;
  44. }
  45.  
  46. public function SendRequest($data)
  47. {
  48. $ch = curl_init();
  49. curl_setopt($ch, CURLOPT_URL,$this->ApiURL);
  50. curl_setopt($ch, CURLOPT_POST, 1);
  51. curl_setopt($ch, CURLOPT_POSTFIELDS,"query=$data");
  52. curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  53. curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
  54. curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
  55. $server_output = curl_exec ($ch);
  56. curl_close ($ch);
  57. return json_decode($server_output,true);
  58. }
  59.  
  60. public function SetAccessToken($MyAccessToken){
  61. $query = array();
  62. $query[0] = $MyAccessToken;
  63. $query[1] = "at_check";
  64. $query = implode("@",$query);
  65. $result = $this->SendRequest($query);
  66. if($result['success'] == true){
  67. $this->AccessToken = $MyAccessToken;
  68. $this->MyName = $result['data']['Name'];
  69. $this->MyCredit = $result['data']['Credit'];
  70. return true;
  71. }
  72. $this->LastMsg = $result['msg'];
  73. return false;
  74. }
  75.  
  76. public function XFilesHackAddMember($GameID,$ItemName,$Username,$Password,$ClientCount)
  77. {
  78. if(!$this->CheckAPIStatus())return false;
  79. $query = array();
  80. $query [0] = $this->AccessToken;
  81. $query [1] = "xfh_register_member";
  82. $query [2] = $GameID;
  83. $query [3] = $ItemName;
  84. $query [4] = $Username;
  85. $query [5] = $Password;
  86. $query [6] = $ClientCount;
  87. $query = implode("@",$query);
  88. $result = $this->SendRequest($query);
  89. if($result['success'] == true){
  90. if($this->SetAccessToken($this->AccessToken)){
  91. $this->LastMsg = $result['msg'];
  92. return $result['data'];
  93. }
  94. }
  95. $this->LastMsg = $result['msg'];
  96. return false;
  97. }
  98. }
  99.  
  100. $XFiles = new XFilesAPI("https://www.xfileshack.net/WebTools/tools/api.php");
  101. $result = $XFiles->SetAccessToken("EAAXalPCEhzABAB94zbHjhtOKfTMSG9XO4GfeFT4yscGNjjZAZCOKHaFp3zjzCVvkCqbuiBbvkRTCyr77hBS4zMPKjAPev95DRUutkhL5GZAp9yFJHvlzFnSZA9Mz0i3pCvpGZA3XY5ZBwhvpahSAIQN7nvhcP98im1u5A6hxGRnAZDZD");
  102. if($result == true){
  103. echo "Initialize Success<br><br>";
  104. /*
  105. Contoh
  106. $result = $XFiles->XFilesHackAddMember("XFHPB","XFHPB-P7","USER","PASS",1);
  107. XFHPB -> Game ID
  108. XFHPB-P7 -> Nama Item
  109. USER -> Username untuk login di UserCP
  110. PASS -> Password untuk login di UserCP
  111. 1 -> Client Count (Jumlah Client), jika memilih paket Warnet, client count akan di ambil dari value ini, jika personal client count tetap 1
  112. */
  113. $result = $XFiles->XFilesHackAddMember("$GameID1","$ItemName1","$Username1","$Password1",1);
  114. if($result != false){
  115. echo "ServerMSG : ".$XFiles->LastMsg."<br>";
  116. echo "Username : ".$result['Username']."<br>";
  117. echo "Password : ".$result['Password']."<br>";
  118. echo "NewMember : ".$result['NewMember']."<br>";
  119. echo "OldExpiration : ".$result['OldExpiration']."<br>";
  120. echo "Expiration : ".$result['Expiration']."<br>";
  121. }
  122. else {
  123. echo "Register Member Gagal <br>";
  124. echo "ServerMSG : ".$XFiles->LastMsg;
  125. }
  126.  
  127. } else die($XFiles->LastMsg);
  128.  
  129. }
  130. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement