Easy Counter


<?php

$filename = 'counter.txt';
$visited = 1;
if (file_exists($filename)) {

$handle = fopen($filename, “rb”);
$visited = fread($handle, filesize($filename));
$visited++;
fclose($handle);

$handle = fopen($filename, “wb”);
fwrite($handle, $visited);
fclose($handle);
echo “This page has been visited $visited times”;
}
else
{
echo “This page has been visited $visited times”;
$handle = fopen($filename, “wb”);
fwrite($handle, $visited);
fclose($handle);
}
echo “http://www.gunungpring.com“;

?>

Tags: ,

Leave a Reply




This some posting which are related to this article :
  • See SMS and Control Another Ponsel
  • Easy Get Variable POST and GET
  • Free Colour Picker Software
  • Bluetooth Chat For Nokia
  • Handle Multiple CheckBox in PHP
  • just read related article


    Some random post which may be interesting :
    this article is selected randomly