awarkops
Dec 17 2005, 12:59 PM
ok just copy this code to the location you want the counter on PHP Code QUOTE <?php $file = 'counter.txt';
if(!file_exists($file)) { $handle = fopen($file, 'w'); fwrite($handle, 0); fclose($handle); }
$count = file_get_contents($file); $count++;
if(is_writable($file)) { $handle = fopen($file, 'w+'); fwrite($handle, $count); fclose($handle); } else { echo 'Could not increment the counter!<br />'; }
echo number_format($count).' Hits'; ?> open notepad and save it as counter.txt then upload it to the director you put the code on the php page a set the permission to 777 when adding this code to you page make sure you save you page as name.php and not as name.htm or name.html or if you have php activation in html u can just save it as html im cant remember how to activate php in html if some one can tell me it will help
Reply
courage
Jan 8 2006, 04:08 AM
well i can say its not the easyest, but realy helpful! now people can't cry about couldn't get a hit counter
Reply
bucksta
Jan 8 2006, 04:42 AM
hit counters are easy to make. all you need is some php knowledge and thats all. its harder making a mySQL hit counter but somehow it turns out better.
Reply
Cerebral Stasis
Jan 8 2006, 06:02 AM
I assume this counter actually counts specific hits, so if one sits in a page and refreshes, the counter will continue to go up, right? I, personally, am only interested in counters that actually count unique visitors or at least unique hits. Perhaps you could create a tutorial explaining how to create a counter that works that way. This "tutorial" may be quite useful, but I'm afraid to say it can hardly count as a tutorial, since it doesn't teach one anything, nor does it explain what the individual parts mean or do.
Reply
BD Photography
Jan 18 2006, 08:41 PM
QUOTE(awarkops @ Dec 17 2005, 12:59 PM) ok just copy this code to the location you want the counter on PHP Code open notepad and save it as counter.txt then upload it to the director you put the code on the php page a set the permission to 777 when adding this code to you page make sure you save you page as name.php and not as name.htm or name.html or if you have php activation in html u can just save it as html im cant remember how to activate php in html if some one can tell me it will help that sounds cool and all. however i jsut dont like other people to see how many other people have visited my site. i like the hit counters taht jsut allow you so see how many people visited your site and at what time of teh day.
Reply
bucksta
Jan 21 2006, 03:17 PM
cool. il try it since i have a blank web site with nothing to put on the main page. a hit counter sounds good.
Reply
wassie
Jan 22 2006, 05:42 PM
omg, then you have a emty website with only a hit counter 0.o
Reply
Dart-kun
Jan 22 2006, 05:57 PM
It's a good tutorial if not a tad short, and pretty simplistic. I recently searching for a hit counter aswell, and ended up finding one that records unique hits each day. So if someone was to Visit my site, it would count 1. No matter how many times they refreash with 24 hours, another hit won't be counted. But after 24 hours, it would raise to 2. It's pretty nice, was just a PHP counter, but it was good. But I ended up losing it, and not being able to find it. Perhaps next time you could make one like this? I'm sure alot of people would like it aswell.
Reply
apollo
Jan 22 2006, 07:13 PM
Hello. I`m new memmber. As courage saied it`s a bit hard for new member, but i`m not begginer with HTMl and PHP, but anyway, it`s not working for me.... Thnx, apo!
Reply
snlildude87
Jan 22 2006, 07:15 PM
Nice code, but why would you make your own when you can have another hit counter done professionally from a site such as statcounter.com that counts unique visitors and shows specific details about each visitor?
Reply
zwek
Feb 22 2006, 06:01 PM
Nice smple and good tnx
Reply
Kioku
Feb 5 2006, 11:52 PM
This is deffinietely better than the "free counter" piece of junk I've been having to use for quite a while. Thanks.
Reply
xavierrd
Jan 29 2006, 07:29 PM
 Seems easy and simple, thanks.
Reply
final_fantasy
Jan 27 2006, 12:07 PM
thanks man
Reply
Recent Queries:--
counters bbcode - 3.50 hr back. (1)
-
free bbcode hit counter - 8.97 hr back. (1)
-
simple web counter html code free - 22.72 hr back. (1)
-
free source code of php hit counter - 81.68 hr back. (1)
-
bbcode hit counter - 80.34 hr back. (2)
-
bbcode counter - 90.55 hr back. (1)
-
free hit counter bbcode - 92.16 hr back. (1)
-
bbcode counters - 48.14 hr back. (4)
-
hit counters in bbcode - 92.97 hr back. (1)
-
counter in bbcode - 93.35 hr back. (1)
-
bbcode page counter - 1.86 hr back. (2)
-
bbcode days counter - 102.48 hr back. (1)
-
free web counter in bbc code - 108.19 hr back. (1)
-
web counter using bbc code - 113.88 hr back. (1)
Similar Topics
Keywords : counter counter- How To Make Your Own Counter Strike Source Dedicated Server!
- (37)
- Php Unique Hit Counter
- Count page hits with php. (29)
Hello all, Here is a neat and helpful PHP script that can count unique page views on your website.
First you need to open up a new page in your text editor and paste in this code. CODE <?php
$filename = "hits.txt"; $file = file($filename); $file =
array_unique($file); $hits = count($file); echo $hits; $fd
= fopen ($filename , "r"); $fstring = fread ($fd , filesize
($filename)); fclose($fd); $fd = fopen ($f...
How To Create Counter-strike 1.6 Server In Console Mode
- (5)
Hello! Now I will show you how to create a CS 1.6 Dedicated server /smile.gif"
style="vertical-align:middle" emoid=":)" border="0" alt="smile.gif" /> 1. Locate HLDS.exe. It
could start it from Steam. 2. Make a batch file. You could name it how you like, I writed it as
start.bat. It should be located in the same folder as the HLDS.exe. It should contain something like
this: CODE HLDS.EXE -console -game cstrike -port 27015 +maxplayers 24 +map bl_counterquake
+sv_lan 0 +rcon_password yourrconpass -secure I recommend -console to be there, couse it starts
hld...
Simple Php Counter Script
- How to make a simple php counter script (2)
In this tutorial i will explain how to make a simple script writen in PHP...that uses .txt file.
CODE <?php // script writen by tema $a = fopen ("count.txt",
"r"); // 1. $bytes = 4; $x = fread($a, $bytes); //
2. $y=$x + 1; // 3. $fp = fopen ("counter/count.txt",
"w+"); // 4. fwrite ($fp, "$y"); // 5. fclose
($fp); // 6. echo "Posjeta:$y"; // 7.
?>...
Clicks Counter
- With PHP + MySQL (0)
Well, in this tut, I'll show you how to do an simple link counter, with only one count for each
IP and the date when the link were clicked. Just remember, this is only one way to do it. First,
create an mysql database called 'links', with 2 table: first table will be called
'links', with the columns: id, title, ref and clicks. The other one will be 3 columns and
will be called links_info: id, ip and date. Just remember that the columns 'id' of this
second table IS NOT auto-increment. Here is the code of the file which will count the clicks, ...
Looking for hit, counter, simple, hit, counter
|
*RANDOM STUFF*
*SIMILAR VIDEOS*
Searching Video's for hit, counter, simple, hit, counter
*MORE FROM TRAP17.COM*
|
advertisement
|
|