Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[PHP]Simple views counter (No DB used)
#1
First create a "visitors.txt", and enter "0" (without quotes) in it. Then add this in a php file.

Code:
<?php $myFile = "visitors.txt"; $fh = fopen($myFile, 'r'); $theData = fread($fh, 5); fclose($fh); intval($theData); $theData = $theData + 1; $fh = fopen($myFile, 'w') or die("Can't Open File"); fwrite($fh, $theData); fclose($fh); echo $theData; ?>
Reply
#2
Nice share bro :)
simple sekali ....
tapi ane enggak tahu isinya apa itu hahhaa Ngakak
http://anime21subs.org

Sibuk ngesub, OPEN RECURITMENT TL, TYPESETTER DLL
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  JS: Simple slide show image Ndra 6 159 04-09-2013, 01:39 AM
Last Post: Ndra
  simple scipt PHP acses HN via localhost If_ 5 183 01-28-2013, 07:33 PM
Last Post: febrian
  [PHP]simple admin page protection sh4dhckr 10 249 01-02-2013, 08:03 AM
Last Post: Jheny
  [php]very simple dictionary attack RieqyNS13 4 117 01-02-2013, 07:58 AM
Last Post: Jheny
  [Share] Simple Make WAP Site Up_ 12 309 08-19-2011, 10:27 PM
Last Post: aandoni
  [e-web] simple cms Dika_xb 13 251 01-31-2011, 01:55 PM
Last Post: NatyaOrigamiâ„¢
Online-offline_16 Backdoor Simple (joomla) index.php Up_ 14 326 06-06-2010, 12:42 PM
Last Post: Jahat
  Counter n Hits akatsuchi 12 182 05-07-2010, 06:51 PM
Last Post: oka1302
  [PHP]simple BOMB file sh4dhckr 9 167 02-23-2010, 02:45 AM
Last Post: Alecs

Forum Jump:


Users browsing this thread: 1 Guest(s)