Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //Idee von Jan über ssh2 die ip von eluten die zu viele male anfragen in den ip-tables sperren
- include('config.php');
- $key = $_GET['key'];
- //Parameter der API
- $username = $_GET['username'];
- //suche nach der Antwort
- $uuid = file_get_contents("http://mcuuid.com/api/$username/raw");
- $db = new mysqli($mysql_ip, $mysql_username, $mysql_pass, $mysql_database);
- if ($db->connect_errno) {
- printf("Connect failed: %s\n", $db->connect_error);
- exit();
- }
- if ($result = $db->query("SELECT * FROM test WHERE $key")) {
- $row = $result->fetch_array(MYSQLI_ASSOC);
- $active = $row['active'];
- $banned = $row['banned'];
- if((int)$banned == 0){
- if((int)$active == 1){
- if(strlen($key) < 9){
- die("Invalid key! Contact the support for further information.");
- }
- //Hier startet die Funktion der API
- if ($uuid == "Bad request"){
- echo "User not found";
- } else {
- echo "$uuid";
- }
- //Bis hier ist die Funktion der API
- }} else {
- die("Invalid key! Contact the support for further information.");
- }
- $result->close();
- } else {
- die("Invalid key! Contact the support for further information.");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement