If you are not registered or logged in, you may still use these forums but with limited features. Show recent topics
  [Search] Search   [Hottest Topics] Hottest Topics   [Members]  Member Listing   [FAQ]  FAQ 
[Register] Register / 
[Login] Login 
Daily Counter 1.1 PHP Installation  XML
Forum Index » Support Forum
Author Message
ET
Graduate

Joined: 21/02/2003 22:17:48
Messages: 179
Offline

Read-me - Installation for Daily Counter 1.1
(Does Not Include MySQL set-up Instructions)

1) Create a directory folder on your webserver/website for the daily counter

2) Edit config.inc.php
a) If using MySQL database - change this line
  1. $COUNT_CFG["use_db"]     = true;   


b) If using Flat Files - leave this line
  1. $COUNT_CFG["use_db"]     = false;  


c) Edit the following lines if needed
  1. $COUNT_CFG["block_time"] = 1800;   
  2.     /* # of seconds  3600=1hr 5400=1.5hr 7200=2hr */  
  3. $COUNT_CFG["offset"]     = -2; //adjust for your time  


d) Add this information only if using MySQL
  1. $COUNT_DB["dbName"] = "Name_of_your_db";  
  2. $COUNT_DB["host"]   = "localhost";   
  3.      // Can normally remain as localhost  
  4. $COUNT_DB["user"]   = "ID_for_Acess2db";  
  5. $COUNT_DB["pass"]   = "Password";  


3) Upload the following files into that new directory:

config.inc.php
counter.class.php
demo.php
visitor.php (CHMOD 755)

+ upload the following if using flat files for records
daily.txt (CHMOD 666)
total_visits.txt (CHMOD 666)
ip.txt (CHMOD 666)

OR upload the following if using MySQL for records
create_tbl.php
mysql.class.php

4) Visit your demo page to check for functioning
  1. http://www.mysite.com/counter_dir/demo.php  


5) To pull the counter into your pages, you will need to use pages with .php extensions (or check for the Mods I have posted on the forum for html pages)

6) Include the following code into the very top of your pages that you want the daily counter to show up (Look at how the demo.php is set up for a visual example)

  1. <?php  
  2.   include ("./counter_dir/config.inc.php");  
  3.   if ($COUNT_CFG['use_db']) {  
  4.      include ("./counter_dir/mysql.class.php");  
  5.   }  
  6.     include ("./counter_dir/counter.class.php");  
  7. $counter = new dcounter();  
  8. $visits = $counter->show_counter();    
  9.        /* Returns an associative array */       
  10.   echo $visits['total'];  
  11.   echo $visits['visits_today'];  
  12. gt;  


7) Include the following into your pages where you want
the daily counter to be displayed: (Use the Demo Page as your example

  1. <font face="Verdana, Arial, Helvetica, sans-serif" size="1">  
  2.   <?php echo date("D, j F Y"); ?>  
  3.   <br><br>  
  4.   Total Visits: <?php echo $visits['total']; ?>  
  5.   <br>  
  6.   <b><a href="javascript:void(window.open('visitors.php','Visitors','scrollbars=yes,width=420,height=210'))" class="links">Visitors</a> today: <font color="#CC0066">  
  7.   <?php echo $visits['visits_today']; ?></font></b>  


Use the Search Engine to check the forum for Daily Counter Modifications

---------------
hypz
Newbie

Joined: 24/07/2006 14:15:05
Messages: 1
Offline

Hello
Where can i fund the mod for html pages?
I search for it but not found it can you plz show me ..
 
Forum Index » Support Forum
Go to:   
Based on the open source JForum