# Hit counter Display

**URL:** <https://forum.kirupa.com/t/hit-counter-display/240337>\
**Category:** programming\
**Created:** [October 2, 2007, 6:05am UTC](https://forum.kirupa.com/t/hit-counter-display/240337 "2007-10-02T06:05:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![anilnavis](https://avatars.discourse-cdn.com/v4/letter/a/ecb155/32.png) [@anilnavis](https://forum.kirupa.com/u/anilnavis)\
**Post date:** [October 2, 2007, 6:05am UTC](https://forum.kirupa.com/t/hit-counter-display/240337/1 "2007-10-02T06:05:44Z")

</div>

Hi,

## I am not an php progarmmer. This php code is for the hit counter This is the code

\<?php  
$count = file\_get\_contents(“count.txt”);  
//Increasing the count  
$count = explode("=", $count);  
$count[1] = $count[1]+1;  
//Writing to file  
$file = fopen(“count.txt”, “w+”);  
fwrite($file, “count=”.$count[1]);  
fclose($file);  
//Returning the count  
print “count=”.$count[1];  
?\>

* * *

its working fine but i need the out put value in 0001, 0002 ,0003 instead of 1,2,3  
Please help me

Thanks
