File size: 1.22Kb
<?php
header("Content-type: text/vnd.wap.wml; charset=ISO-8859-1");
$tie = fopen('chatpaikalla.txt', 'r+');
$jui=file('chatpaikalla.txt');
$ko=file_get_contents ('chatpaikalla.txt');
for ($i=0; $i<count($jui); $i++)
{
$hee=$jui[$i];
$alo=explode("¤",$jui[$i]);
$erotus=time()-$alo[1];
if ($erotus>=120){$ko = str_replace ($hee,'',$ko);}
}
ftruncate($tie,0);
fputs($tie, $ko);
fclose($tie);
$chatpaik=file('chatpaikalla.txt');
$paikk=file('paikalla.txt');
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"\n \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n";
echo "<!-- MobiiliChat v1.1 -->\n";
echo "<!-- Copyright (C) 2004-2005 Keijo Kangas ([email protected]) -->\n";
echo "<wml>\n";
echo "<head>";
echo "<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>";
echo "</head>";
echo "<card newcontext=\"true\" title=\"MobiiliChat v1.1(Beta)\">\n";
echo "<p>\n";
echo "Testing area:<br/>\n";
echo count($chatpaik).' volunteer testers online.<br/>';
echo "<a href=\"sisaan.php\">[Login]</a><br/>\n";
echo "<a href=\"luonti.wml\">[Create account]</a><br/>\n";
echo "</p>\n";
echo "</card>\n";
echo "</wml>\n";
?>