Follow along with the video below to see how to install our site as a web app on your home screen.
Бележка: This feature may not be available in some browsers.
<?php
$ip = $_SERVER['REMOTE_ADDR'];
if($ip == "IP-тo"){ echo "Твоето IP е блокирано"; } else { echo "Твоето IP не е блокирано"; }
?>
ErrorDocument 403 /403.html
deny from ip
<html>
<head>
<title>Вие сте баннат!</title>
<meta http-equiv="Content-Type" content="text/html;charset=windows-1251"/>
</head>
<body>
<center><h2>Вие нямате достъп до този сайт, защото сте баннат!</h2>
</center>
</body>
</html>
CREATE TABLE `banned_ip` (
`ID` INT NOT NULL ,
`username` VARCHAR( 250 ) NOT NULL ,
`ip_adres` VARCHAR( 20 ) NOT NULL ,
PRIMARY KEY ( `ID` )
) ENGINE = MYISAM ;
$us_ip = getenv("REMOTE_ADDR");
mysql_connect('localhost', 'root', 'password') or die(mysql_error());
mysql_select_db(' //твоята таблица ');
$our = 'SELECT * FROM banned' or die(mysql_error());
$res = mysql_query($our);
while ($row = mysql_fetch_assoc($res)) {
$ip_res = $row['ip_adres'];
if ($ip_res == $us_ip) {
echo 'you are BANNED';
exit;
if ($_POST['push']){
$user=$_POST['user'];
$adress=$_POST['adress'];
mysql_connect('localhost', 'root', 'password') or die(mysql_error());
mysql_select_db('// твоята таблица');
$sq=mysql_query('INSERT INTO banned_ip (username , ip_adres) VALUE ("'.($user).'" , "'.($adress).'")');
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title></title>
</head>
<body>
<form action=""method="POST">
<i>Въведeте име</i><br>
<input type="text" name="user"><br>
<i>Въведeте IP-адрес</i><br>
<input type="text" name="adress"><br>
<input type="submit"value="Търси">
<input type="hidden"value="1"name="push">
</form>
</body>
</html>