Logger

By log2 on Dec 20, 2004

This script will log every person who comes on to your site, if you put this on every page with a new file for each page then you could tell what every person did on your site unless they download something. Right now the file is admin.txt, so you will have to create that file too.

<?php

$Date = date("F jS Y, h:iA");

$user_ip = $REMOTE_ADDR;

$host = gethostbyaddr($user_ip);

$user_browser = $HTTP_USER_AGENT;

$file = "admin.txt";

$fp = fopen($file, "a+");

fputs ($fp, "<br>Date: $Date <bR> IP: $user_ip <br> Host $host <br> Browser: $user_browser<br>------------------------------------<br>");

fclose($fp);

?>

Comments

Sign in to comment.
LordHawk   -  Feb 28, 2008


Date: February 28th 2008, 07:34PM
IP:
Host
Browser:
------------------------------------

this is what it displays in the admin.txt file.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.