DEZE CODE MOET JE IN JE index.php ZETTEN!

<?
	// defineer bestand waarin ip's worden opgeslagen
	// doe dit bestand: chmod 777
	$file = "cfgs/ip.dat";
	
	// pak het ip adres
	$addr = $_SERVER['REMOTE_ADDR'];
	
	// defineer het bestand
	$filename = file($file);
	
	// check voor aanwezigheid ip adres
	$count = count($filename);
	
	$ip = "";
	for($i = 0; $i < $count; $i++)
	{
		if(eregi($addr,$filename[$i]))
		{
			$ip = "exists";
		} 
	}
	
	// defineer hoeveel ip adressen in totaal
	$total = 20;
	
	// check of ip bestaat
	if(!$ip)
	{
		// defineer het bestand
		$filename = file($file);
		
		// open het bestand
		$openfile = fopen($file,"w");
		fputs($openfile,"$addr<br>\n");
		
		// hou bij hoeveel er nu in staan
		for($i = 0; $i < ($total-1); $i++)
			fputs($openfile,$filename[$i]);
		
		// sluit het bestand
		fclose($openfile);
	}
?>

DEZE CODE KUN JE ERGENS ANDERS IN ZETTEN, OF GEWOON ALS ipadressen.php OFZO

<?
    // twintig laatste ip adressen
    echo "Laatste ip adressen:<BR>";
    require("cfgs/ip.dat");
?>
