Jump to content
php.lv forumi

IP


p4F

Recommended Posts

Apmēram šādi:

Pie katras kustības

if(!check_online()){

add_activity();

}

else{

//no shiis ip jau pashlaik skataas lapu

}

 

function check_online(){

select count(*) from online_ips where ip = REMOTE_ADDR and last_activity < 'cik nu tur minuutes'

list($num) = _fetch_array($result);

if($num == 0){

return FALSE;

}

return TRUE;

}

 

function add_activity(){

insert/update online_ips set last_activity = mktime();

}

 

Update:

Aa, un plus veel sesiju vai kuukiju klaat tam, kuram driikst skatiities, savaadaak sanaak, ka tikai vienu klikshkji var izdariit :))

Edited by Kristabs
Link to comment
Share on other sites

A Tu zini, ko dara preg_match() ? :)

ka es atceros tas atlauj vai aizliec kaadu darbu

if (((preg_match ($_SERVER['REMOTE_ADDR'], $_SERVER['HTTP_USER_AGENT']))))  {
sheit iet kad ieiet
}

nui kautkā tā kaa lai vinsh ieietu vienureizi ar ip vienlaikus

Edited by p4F
Link to comment
Share on other sites

×
×
  • Create New...