As i sow a lot of sites use hit counter but they use the free ones that advertise for free on your website so i decided to release my script have fun with it and don't forget to give me some like(thanks)
PHP Code:<?php
$file = "/path/hits_database.txt";
$ip_list = file($file);
$visitors = count($ip_list);
if (in_array($_SERVER['REMOTE_ADDR']."\n", $ip_list))
{
echo "<b>Our Site Hits: </b>: $visitors <br>";
fclose($fp);
} else {
$fp = fopen($file,"a");
fwrite($fp, $_SERVER['REMOTE_ADDR']."\n");
fclose($fp);
$visitors++;
echo "<b>Our Site Hits: </b>: $visitors <br>";
}
?>![]()


Reply With Quote

