- Impact
- 0
counter.php -
<?php
if($count=="NAME-OF-SITE") {
$file = "NAME-OF-SITE.txt";
$open = fopen($file, "r");
$size = filesize($file);
$count = fread($open, $size);
fclose($open);
$open = fopen($file, "w");
$count++;
fwrite($open, $count);
fclose($open);
Header('Location: http://URL-OF-SITE');
exit;
}
?>
For the link:
<a href="http://www.YOURSITE.com/counter.php?count=NAME-OF-SITE">NAME-OF-SITE</a>
For the counter:
<?PHP
include("NAME-OF-SITE.txt");
?>
----
Make a .txt file and put "0" w/o the " but name it the name of the site. CHMOD this file to 777.
All the "NAME-OF-SITE"'s must math.
<?php
if($count=="NAME-OF-SITE") {
$file = "NAME-OF-SITE.txt";
$open = fopen($file, "r");
$size = filesize($file);
$count = fread($open, $size);
fclose($open);
$open = fopen($file, "w");
$count++;
fwrite($open, $count);
fclose($open);
Header('Location: http://URL-OF-SITE');
exit;
}
?>
For the link:
<a href="http://www.YOURSITE.com/counter.php?count=NAME-OF-SITE">NAME-OF-SITE</a>
For the counter:
<?PHP
include("NAME-OF-SITE.txt");
?>
----
Make a .txt file and put "0" w/o the " but name it the name of the site. CHMOD this file to 777.
All the "NAME-OF-SITE"'s must math.
Last edited:
















