sry.
To co vkládám na stránku která má být zabanovaná pro tu IP je toto
// func.ban.php
// checks the ip to see if it is banned
function checkban($ip)
{
// querys database
$q = mysql_query("SELECT * FROM `banned` WHERE `ip` = '$ip' LIMIT 1");
$get = mysql_num_rows($q);
// if found
if ($get == "1")
{
// deny user access
$r=mysql_fetch_array($q);
die("You have been banned from this website until $r[legnth]. If you feel this is in error, please contact the webmaster.");
}
}
Ale je to nefunkční, chybu to hlásí Warning: mysql_query() [function.mysql-query]: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2) in /www.......
a to na řádku $q = mysql_query("SELECT * FROM `banned` WHERE `ip` = '$ip' LIMIT 1");