간단한 방문자는 스크립트 내 페이지 (나는 그것이 매우 부정확하고 나쁜 알고 있지만, 지금이 순간에 테스트 용으로 만 사용)에 통합 (PHP) 단순 방문자 카운터를:내가 가진 카운터
<?php
$file = "counts.html";
//if cookie isn't already set,then increase counts by one + save ip, and set a cookie to pc...
$cookie_namee='mycounterr-456';
if (!isset($_COOKIE[$cookie_namee])) {
file_put_contents($file, (!file_exists($file) ? 0: (file_get_contents($file)+1)));
setcookie($cookie_namee, "Checked", time()+99999, '/');
}
?>
이 있습니까 방문자의 IP도 얻는 방법? (echo $ GET_REMOTE_IP; does not work).
$ _SERVER 변수를 살펴보면 필요한 경우 IP 및 기타 여러 정보 비트를 제공 할 수 있습니다. http://php.net/manual/en/reserved.variables.server.php – azzy81
[PHP에서 클라이언트 IP 주소를 얻는 방법]은 중복 될 수 있습니까? (http://stackoverflow.com/questions/3003145/how-to) -get-client-ip-address-in-php) –