`Hello guys im trying to make this php code;
if(file_exists("u/txt/Chat/logged.txt")){
$file = $_SERVER[PHP_SELF];
if($file=="/systemchat.php"){
$file = file_get_contents("u/txt/Chat/logged.txt");
if(!strpos($file, $username)) {
$myFile = "u/txt/Chat/logged.txt";
$fh = fopen($myFile, 'a+') or die("Can't open file");
$stringData = '<b>'.$username.'</b><br/>';
fwrite($fh, $stringData);
fclose($fh);
}
}
refreshed every second with Ajax, wondering how i should do that, havent had time to learn ajax :/