Jump to content
php.lv forumi

Paliigaa !


gints

Recommended Posts

Nu lai es vareetu redzeet savai lapai apmekleejumus, un ip.

un kur problēma ? tas tak nav sarežģīti...

 

1. paņem IP

getenv("REMOTE_ADDR")

2. pārbaudi vai tāds jau ir

SELECT `ip` FROM `visitors` WHERE `ip`=$ip

3.1. ja ir tad pieskaiti hitu

UPDATE `counter` SET `hits` = `hits`+1

3.2. ja nav tad pieskaiti hostu un hitu

UPDATE `counter` SET `hosts` = `hosts`+1, `hits` = `hits`+1

4. parādi hostus un hitus

SELECT `hosts`, `hits` FROM `counter`

 

ideju gan jau saprati...

Link to comment
Share on other sites

×
×
  • Create New...