Loading ...
Sorry, an error occurred while loading the content.

Hit counter

Expand Messages
  • parvez
    // 1) Create a text file name: hit.txt // 2) Create a folder name: count containing files // 0.gif,1.gof.....9.gif // 3) Create a php file
    Message 1 of 1 , Nov 5, 2004
    • 0 Attachment
      // 1) Create a text file name: hit.txt
      // 2) Create a folder name: count containing files
      // 0.gif,1.gof.....9.gif
      // 3) Create a php file name: hit.php containing these codes
      // given below
      // For getting output visit www.rajshahionline.com
      // for getting images www.rajshahionline.com/count/1.GIF ....

      <html>
      <body leftmargin="0" topmargin="0" bgcolor="#DCE6F1">

      <center>

      <table border="1" cellpadding="0" cellspacing="0" style="border-
      collapse: collapse" bordercolor="#000080" width="6%">
      <tr>
      <td width="100%" style="padding: 0" align="center">
      <img border="0" src="count/visitor.gif" width="100"
      height="25"></td>
      </tr>
      <tr>
      <td width="100%" style="padding: 0" align="center"
      bgcolor="#FFFFFF">



      <?php
      $fp = fopen ("hit.txt", "r+");
      $c=fgets($fp,100)+1;
      fclose($fp);
      $fp = fopen ("hit.txt", "w+");
      fwrite($fp,$c);


      fclose($fp);

      $str= $c ;

      $ch = strlen($str);
      $tt=0;

      while($tt<$ch)
      {

      $cha = substr ($str, $tt,1);


      if ($cha==0)
      {echo "<img src='count//0.GIF' height='11'>";}
      if($cha==1)
      {echo "<img src='count//1.GIF' height='11'>";}
      if($cha==2)
      {echo "<img src='count//2.GIF' height='11'>";}
      if($cha==3)
      {echo "<img src='count//3.GIF' height='11'>";}
      if($cha==4)
      {echo "<img src='count//4.GIF' height='11'>";}
      if($cha==5)
      {echo "<img src='count//5.GIF' height='11'>";}
      if($cha==6)
      {echo "<img src='count//6.GIF' height='11'>";}
      if($cha==7)
      {echo "<img src='count//7.GIF' height='11'>";}
      if($cha==8)
      {echo "<img src='count//8.GIF' height='11'>";}
      if($cha==9)
      {echo "<img src='count//9.GIF' height='11'>";}

      $tt=$tt+1;

      }



      ?>

      </td>
      </tr>
      </table>
      </center>
      </body>

      </html>
    Your message has been successfully submitted and would be delivered to recipients shortly.