Уважаемый siiXth, когда я начну сам изучать php, реализовать свои идеи я тоже буду сам и допиливать что к чему. А сейчас
и ? реализуй! ты так говоришь как будто в календарике день обведён. ты хоть бы тот код для начала проверил , а потом дальше шёл. никто тебе не поможет, особенно с таким желанием к самостоятельной реализации. тут без этого просто так не помогают fuck this
PHP: <?php if(!file_exists('counter.txt')){ file_put_contents('counter.txt', '0'); } if($_GET['click'] == 'yes'){ $ip=$_SERVER['REMOTE_ADDR']; $file=file_get_contents('users_ip.txt'); $file=explode("|",$file); if(!in_array($ip,$file)) { file_put_contents('counter.txt', ((int) file_get_contents('counter.txt')) + 1); $file[]=$ip; $file=implode("|",$file); file_put_contents('users_ip.txt',$file); header('Location: ' . $_SERVER['SCRIPT_NAME']); die; } else { echo "Вы уже голосовали"; header('Location: ' . $_SERVER['SCRIPT_NAME']); } } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="ru" xml:lang="ru"> <head> <title></title> <meta http-equiv="content-type" content="text/html; charset=windows-1251" /> <meta name="description" content="" /> <meta name="keywords" content="" /> <link rel="stylesheet" href="style.css" type="text/css" /> </head> <body> <div id="text"> <p>Переходи на тёмную сторону<br />...у нас печеньки<br />нас уже <?php echo file_get_contents('counter.txt'); ?></p> <form method="POST" action="<?=$_SERVER['SCRIPT_NAME']?>"> Введите Ваше имя: <input type="text" name="name"> <a class="dark" href="?click=yes">Темная сторона</a> </div> <div id="users"> <?php echo file_get_contents('users_ip.txt'); ?> </div> <div id="copy"> <p>© by К@ЛЬЯНЫЧ</p> </div> </body> </html> http://blablablahamyha.500mb.net/page2/page2.php Что-то не так. В чем ошибка?