<?php
// -------------------------------------
// Verander de variabelen hieronder
$ShoutboxB = "shoutbox.dat";
// Het bestand waar de berichten
// in opgeslagen worden...
$EenKeerAchterElkaar = true;
// Mogen ze maar één keer achter elkaar
// gegevens insturen? true; of false;
$IPBestand = "ip.dat";
// Het bestand waar het laatste IP
// adres in opgeslagen wordt...
$Aantal = 50;
// Het maximum aantal berichten in de shoutbox
// Na hier hoef je niets te veranderen!
// -------------------------------------
$Inhoud = file($ShoutboxB);
if($toevoegen && trim($bericht) && trim($naam)
&& !@strstr(@implode("",@file($IPBestand)),"$REMOTE_ADDR|")) {
$Bestand = fopen($ShoutboxB,"w");
for($i = (count($Inhoud)-$Aantal+1); $i < count($Inhoud); $i++) {
fputs($Bestand,$Inhoud[$i]); }
fputs($Bestand,"<a href='mailto:".
htmlentities(trim(substr($email,0,25)),ENT_QUOTES)."'>".
htmlentities(trim(substr($naam,0,25)),ENT_QUOTES)."</a>: ".
htmlentities(trim(substr($bericht,0,100)),ENT_QUOTES)."<br>\n");
fclose($Bestand);
if($EenKeerAchterElkaar) { $IpBestand = fopen($IPBestand,"a");
fputs($IpBestand,"$REMOTE_ADDR|"); fclose($IpBestand); }
echo("<b>Je bericht is succesvol toegevoegd!</b><br><br>");
}
echo(implode("",file($ShoutboxB)));
?>