Easy Click-Counter
2 posters
Page 1 of 1
Easy Click-Counter
So how to make a Counter, its really easy, you just need a Text file to safe the actual counterstand, to start we read the current counterstand from the .txt file and after that give out the stand and then increase of the stand and saving it again.
To display that at Manialinks u just create a simple label with this as text tag: text="Clicks: '.$counterstand.' "
It must be saved to the same .php file
For Help to my Tutorials use the Thread in the Questions&Help Forum
To use it you just must upload it to your webspace and create a simple text file with a "0" in it with the name: "clickcounter.txt"
<?php
//Opening and reading of the counterstand:
$handle=fopen("clickcounter.txt", "r");
$counterstand=fgets($handle);
fclose($handle);
//Show the Clicks:
echo'Clicks: '.$counterstand.'';
//Increasing and Saving of the clicks:
$counterstand++;
$handle=fopen("clickcounter.txt", "w+");
fwrite($handle, $counterstand);
fclose($handle);
?>
To display that at Manialinks u just create a simple label with this as text tag: text="Clicks: '.$counterstand.' "
It must be saved to the same .php file
For Help to my Tutorials use the Thread in the Questions&Help Forum
Re: Easy Click-Counter
ok i dont understand this, what i nead tu make php or txt file?
condor- Posts : 1
Join date : 2011-07-01
Re: Easy Click-Counter
basics u can do with editor/notepad that comes with every windows idk how its called at other OS but there should be something like that. if you want to do more skilled stuff get a editor that supports highlighting odf code like Notepad ++
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum