$hostname = "localhost"; // amxbans ip
$username = "root"; // amxbans login
$password = ""; // amxbans password
$database = "db"; //amxbans database
$connect = mysql_connect($hostname, $username, $password) or die(mysql_error());
$select = mysql_select_db($database, $connect) or die(mysql_error());
$banas = mysql_query("SELECT player_ip,bid FROM amx_bans WHERE player_ip = '$ip' LIMIT 1");
$row = mysql_fetch_array($banas, MYSQL_ASSOC);
if(!$row) {
echo "Statusas: <b><span style=\"color:green\">Neužbanintas </span></b><br>";
} else {
echo "Statusas: <b><span style=\"color:red\">UŽBANINTAS! </span></b><br>";
}