Files
minecraft-plugins/EasyBans-Web/api/api.php
jslightham 05166c347e big push
2020-04-21 10:17:31 -04:00

16 lines
403 B
PHP

<?php
define("key", KEY); // TODO: Make key customizable.
function get_mysql(){
$mysql = new MySQLi("remotemysql.com", "wptYz7NcqF", "62WcmjpDNu", "wptYz7NcqF");
if($mysql->connect_error){
die($mysql->connect_error);
}
return $mysql;
}
function add($uuid, $reason){
get_mysql()->query("INSERT INTO bans (uuid, date, reason) values ('$uuid', '" date("Y-M-D H:M:S") "', ");
}
?>