|
Тема |
Re: click counter [re: X-FLaSheR] |
|
Автор |
moonjogger (влюбен...) |
|
Публикувано | 07.02.03 17:38 |
|
|
<?php
function getVar($var){
global $HTTP_GET_VARS,$HTTP_POST_VARS;
return empty($HTTP_POST_VARS) ? (isset($HTTP_GET_VARS[$var]) ? $HTTP_GET_VARS[$var] : "") : (isset($HTTP_POST_VARS[$var]) ? $HTTP_POST_VARS[$var] : "");
}
$fcont = @file('countdata.txt');
$fcont = (int) $fcont[0];
$f = fopen("countdata.txt",'w');
if(getVar('action') == 'update') fwrite($f,++$fcont);
echo "&visits=$fcont&";
fclose($f);
?>
|Не закусвам-влюбен съм. Не обядвам-влюбен съм. Не вечерям-влюбен съм. Не спя-гладен съм|
|
| |
|
|
|