Put this in the front of everypage or just your startpage and rename ik to .php
<?php
include("iplogger.php");
?>
Put this script in your rootdirectory and name it iplogger.php
<?
$file = "stats.txt";
$open = fopen( $file, "a" ) or die ( "Operation Failed!" );
fputs( $open, "<tr><td><font size=1 face=\"Verdana\">$HTTP_USER_AGENT</font></td><td><font size=1 face=\"Verdana\">$REMOTE_ADDR</font></td><td><font size=1 face=\"Verdana\">$HTTP_REFERER</font></td>\n" );
fclose( $open );
?>
Also put a stats.txt in your root directory
Use this script to view the ip's online and call it view_ip.php
<html><head><title>View Stats</title>
</style>
<!--
.tabletext {
text-size:11;
font-family:Verdana;
}
-->
</style>
</head>
<body bgcolor=#660000>
<center>
<table cellpadding=2 bgcolor=white border=0 style="border:1px solid black">
<tr><th width=200><font size=2 face="centhury gothic">Browser</font></th><th width=100><font size=2 face="Verdana">IP Address</font></th><th width=200><font size=2 face="Verdana">Reffer Address</font></th>
<tr>
<?php
// Declare file
$file = "stats.txt";
// Open and check file
$open = fopen( $file, "r" ) or die ( "Operation Failed!" );
// For each line..
while ( ! feof( $open ) ) {
// Seperate Values
$line = fgets( $open, 1024 );
print $line;
}
fclose( $open );
?>
</table>
<br><font face="Verdana" size=1>Powered by IP Logger 1.0</font>
</body></html>