PHP |
$views = $pop['view'] + 1;//добавляем +1 к числу просмотров |
PHP |
$ip = $_SERVER['REMOTE_ADDR']; |
SQL |
$ip = $_SERVER['REMOTE_ADDR']; $updates = mysql_query ("UPDATE `articles` SET `view`=`view`+1, `ts`=NOW() WHERE id='$id' AND ((NOW() -`ts` > 2))",$db); |
PHP |
header( "Refresh: ...... "); |