Просмотр файла mobilechat_v1.04/home.php

Размер файла: 872B
<?php
header("Content-type: text/vnd.wap.wml");


$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');

echo "<?xml version=\"1.0\"?>\n";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"\n \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n";
echo "<wml>\n";
echo "<card title=\"MobileChat\">\n";
echo "<p>\n";
echo count($chatpaik).' users 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";

?>