Ma`lumotlar : 1092
Xabarlar soni: 314
Bugun: 26.4.2024
Soat: 4:11
Php da ko'chirilgan fayl uchun hisoblagich
Muallif: Mengliyev SH.
Qo`shilgan sana: 2014-09-19
Php da ko'chirilgan fayl uchun hisoblagich
hisoblagich.php
<?
$gcc_aspect = "img/ct"; // 0-9 rasmgan iborat jpg 10X12 rasm
$gcc_file = "counter.txt"; // bloknot fayl
$gcc_cookie_name = "my_cookie_name";
$gcc_cookie_value = "my_cookie_value";
$gcc_cookie_life = "900";
if(!file_exists("$gcc_file"))
{
$gcc_fp=fopen("$gcc_file","a");
fputs($gcc_fp,"0");
fclose($gcc_fp);
}
$gcc_alt = 'alt=""';
if(isset($_COOKIE["$gcc_cookie_name"]) && $_COOKIE["$gcc_cookie_name"] == "$gcc_cookie_value")
{
$gcc_fp=fopen($gcc_file,"r+");
$gcc_hits=fgets($gcc_fp,10);
$gcc_hits = "<a href='http://www.tami.uz/' target='_blank'>".$gcc_hits;
$gcc_hits = str_replace("0","<img src='$gcc_aspect/0.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("1","<img src='$gcc_aspect/1.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("2","<img src='$gcc_aspect/2.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("3","<img src='$gcc_aspect/3.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("4","<img src='$gcc_aspect/4.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("5","<img src='$gcc_aspect/5.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("6","<img src='$gcc_aspect/6.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("7","<img src='$gcc_aspect/7.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("8","<img src='$gcc_aspect/8.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("9","<img src='$gcc_aspect/9.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = $gcc_hits."</a>";
}
else
{
setcookie($gcc_cookie_name, $gcc_cookie_value, time()+$gcc_cookie_life, "");
$gcc_fp=fopen($gcc_file,"r+");
$gcc_hits=fgets($gcc_fp,10);
$gcc_hits++;
fseek($gcc_fp,0);
fputs($gcc_fp,$gcc_hits);
fclose($gcc_fp);
$gcc_hits = "<a href='http://www.tami.uz/' target='_blank'>".$gcc_hits;
$gcc_hits = str_replace("0","<img src='$gcc_aspect/0.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("1","<img src='$gcc_aspect/1.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("2","<img src='$gcc_aspect/2.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("3","<img src='$gcc_aspect/3.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("4","<img src='$gcc_aspect/4.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("5","<img src='$gcc_aspect/5.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("6","<img src='$gcc_aspect/6.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("7","<img src='$gcc_aspect/7.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("8","<img src='$gcc_aspect/8.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = str_replace("9","<img src='$gcc_aspect/9.jpg' $gcc_alt>","$gcc_hits");
$gcc_hits = $gcc_hits."</a>";
}
// ------
$gcc_hits = str_replace('alt=""','alt="" border="0" height="12" width="10"',$gcc_hits);
// -------------------------------------------------------------------------------------- //
?>
natija.php
<? include("hisoblagich.php"); ?>
<HTML>
<BODY>
Counter: <? echo $gcc_hits; ?>
</BODY>
</HTML>
2199 marta o`qildi.