IP:

Name:

Reason:

$token, 'ip' => $_POST['ip'], 'name' => $_POST['name'], 'reason' => $_POST['reason']); $response = getResponse($ip, $port, '/bans/create/', $params); print_success($response['response']); } else { print_failure("No Token Found!"); } } } if($_GET['show'] == 'list') //View all bans in the tshock database. { if($token){ $params = array('token' => $token); $response = getResponse($ip, $port, '/v2/bans/list/', $params); $bans_table = ""; foreach ((array)$response['bans'] as $ban) { $bans_table .= ""; foreach ((array)$ban as $ban_key => $ban_value) $bans_table .= ""; $bans_table .= ""; } $bans_table .= "
".strtoupper($ban_key).": ".$ban_value."
"; echo $bans_table; } else { print_failure("No Token Found!"); } } if($_GET['show'] == 'read') //View the details of a specific ban. { ?>

Username or IP:

Type: IP Name

Case Sensitive (Name lookups should be case sensitive.)

$token, 'ban' => $_POST['ban'], 'type' => $_POST['type'], 'caseinsensitive' => $caseinsensitive); $response = getResponse($ip, $port, '/v2/bans/read/', $params); if($response['status'] == '200') { $bans_table = ""; foreach ((array)$response as $ban_key => $ban_value) if($ban_key != 'status') $bans_table .= ""; $bans_table .= "
".strtoupper($ban_key).": ".$ban_value."
"; echo $bans_table; } else { print_failure($response['error']); } } else { print_failure("No Token Found!"); } } } } }