Размер файла: 1.3Kb
<?php
$filename ="vsego.dat";
$fp = @fopen ($filename, "r");
if($fp){$counter = fgets($fp, 10);
fclose($fp);
} else { $counter = 0; }
$counter++;
$fp = @fopen ($filename, "w");
if($fp) {$w = fputs($fp, $counter); fclose($fp); }
$fp=fopen("on/$counter.dat","w");
fputs($fp,"");
fclose($fp);
chmod ("on/$counter.dat", 0777);
$kod="<a href=\"http://****/online/who.php?id="; /////////код счетчика
$kod2="\"><img src=\"http://****/online/online.php?id=";
$kod3="\" alt=\"online\"/></a>";
$kod=htmlspecialchars(stripslashes($kod));
$kod2=htmlspecialchars(stripslashes($kod2));
$kod3=htmlspecialchars(stripslashes($kod3));
include "conf.php";
include "unicode.lib.php";
header ("Content-type: text/vnd.wap.wml");
print utf_encode("<?xml version=\"1.0\"?>\n
<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n
<wml>\n
<head><meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>\n
<meta http-equiv=\"Pragma\" content=\"no-cache\"/></head>\n
<card id=\"gb\" title=\"online\">\n");
print utf_encode("<p align='left'><small>
Разместите ссылку
$kod$counter$kod2$counter$kod3
<br/>
<a href=\"$url\">****</a>
</small>
</p>");
print "</card></wml>\n";
?>