Limbi
29.05.2002, 23:07:47
Hallo alle! Nun eine Frage... Kann man einen Chatraum gut mit PHP programmieren?
Ich hab mir sowas vorgestellt:
<head>
<script>
var Time = 3;
function chat()
{
if(Time == 0)
{
parent.location.reload();
Time = 3;
}
Time--;
window.set.Timeout("chat();",1000);
}
</script>
<?
$chatfile = "chat.htm";
$chatread = fopen($chatfile,"r");
$chatwrite = fopen($chatfile,"w");
if($Eingabe)
{
fputs($chatwrite,$Eingabe);
}
$read = fopen($chatread);
echo $read;
?>
</head>
<body>
<form name="form" method="post">
<input type="text" name="box" size="30">
<input type="submit" value="Eingabe senden">
</form>
</body>
Kann mir da jemand etwas besseres vorschlagen?
Thxx.... Ich weiss mir sonst nicht weiter zu helfen....
Ich hab mir sowas vorgestellt:
<head>
<script>
var Time = 3;
function chat()
{
if(Time == 0)
{
parent.location.reload();
Time = 3;
}
Time--;
window.set.Timeout("chat();",1000);
}
</script>
<?
$chatfile = "chat.htm";
$chatread = fopen($chatfile,"r");
$chatwrite = fopen($chatfile,"w");
if($Eingabe)
{
fputs($chatwrite,$Eingabe);
}
$read = fopen($chatread);
echo $read;
?>
</head>
<body>
<form name="form" method="post">
<input type="text" name="box" size="30">
<input type="submit" value="Eingabe senden">
</form>
</body>
Kann mir da jemand etwas besseres vorschlagen?
Thxx.... Ich weiss mir sonst nicht weiter zu helfen....