icon-counter.php

<?
/*
  IconCounter is a very simple text counter but with an icon just like
  freeemoticon counter.
  by : iwyrobi < iwyrobi@yahoo.com >.
  http://www.iwyrobi.f2s.com
*/  

$counterfile="count.txt";
$hit = 0;
if (file_exists($counterfile)){
    $handel = fopen($counterfile,"r");    
    $hit = 0+fgets($handel, 20);
    fclose($handel);
}

$hit++;
$handel = fopen($counterfile,"w");
fputs($handel,$hit);
fclose($handel);

if ($hit<100):
  printf("<font face='verdana' size='2'><img src='gbr/sedih2.gif' ALIGN='top'> <b>%06d</b></font>",$hit);
elseif ($hit<400):
  printf("<font face='verdana' size='2'><img src='gbr/smile.gif' ALIGN='top'> <b>%06d</b></font>",$hit);
elseif ($hit<1000):
  printf("<font face='verdana' size='2'><img src='gbr/kerdip.gif' ALIGN='top'> <b>%06d</b></font>",$hit);
elseif  ($hit<2000):
  printf("<font face='verdana' size='2'><img src='gbr/hoho.gif' ALIGN='top'> <b>%06d</b></font>",$hit);
elseif ($hit<4500):
  printf("<font face='verdana' size='2'><img src='gbr/gigikelihatan.gif' ALIGN='top'> <b>%06d</b></font>",$hit);
else:
printf("<font face='verdana' size='2'><img src='gbr/kacamata.gif' ALIGN='top'> <b>%06d</b></font>",$hit);  
endif

?> 
 
info/icon-counter.txt · Dernière modification: 2008/11/11 11:37 (modification externe)
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki