###############################
#
# X-Stat
# www.xqus.com/x-stat
#
###############################
#
# Date: 01.19.2002 (mm.dd.yyyy)
# Author: Audun Larsen.
# web: www.xqus.com/x-stat
# mail: audun@xqus.com
#
#################
#
# This script is copyright  2000-2010 by Audun Larsen, All Rights Reserved. 
#
# This script may be downloaded and used for any purpose, including commercial, 
# provided that the Conditions are met.
#
# Conditions:
#  -> Do NOT remove any of the copyright notices in the script.  
#  -> This script can not be distribuated by anyone else than the author, unless special permisson is given.
#
# The author is not responible if this script causes any damage to your server or computers.
#
#################################

Contents:
   1. Upgrading
   2. Installing
   3. Extra configuration

############### 1. UPGRADING

1.1) If you are upgrading from an older version than v.2.3:

1.1.1) Upload all files from the zip file to your x-stat directory on your server.
1.1.2) Chmod the base dir (probably called x-stat) to 777, the 'logs' dir to 777 and all the files in the 'logs' dir to 666.
1.1.3) Open upgrade.php and edit the $full_dir=""; to the full path to upgrade.php.
       Example: /home/user/public_html/x-stat
       Do NOT include a trailing slash.
1.1.4) Run the upgrade.php file.
1.1.5) Delete upgrade.php from your server.

1.2) If you have x-stat v.2.3 or newer installed just upload,
-config.php
-functions.php
-x_stat.php
-x_stat_admin.php
-text.css

and the images folder.

All bugs should be reported at: http://xqus.com/

If you need help visit the x-stat support forums: http://www.xqus.com/

############### 2. INSTALLING


2.1) Unzip all the files and folder to a folder on your computer.

2.2) Open the config.php file, and edit it to your needs.
	$admin_pass - The password you need for administrative access.

	$use_pass - Set this to 1 if you want to use password protection on your
		    stats page. Else, use 0.  

	$start_date - Set this to todays date, or the last reset date if you are upgrading.

	$server_domain - Set this to the domain name to your server.
		Examples:
			name.f2s.com
			domain.com/home/name
	
	$max_log_size - This is the max size of the log file in bytes. When this size is reached,
		             the log file is reset.

	$want_monthly_log - If you want to keep your monthly stats in a seperate logfile, that is generated each time
			      you reset your main log file, set this to 1, if not, set it to 0. The monthly log file does,
			      only contain number of page views in each month.

2.3) Upload all the files to a folder on you server (x-stat as default) Do NOT upload upgrade.php unless you are upgrading.

2.4) Chmod the folder 'logs' and the files logs/count.txt, confing.php, logs/monthly.log and logs/stats.txt to 666.

2.5) Add this code to the pages you want to track (edit the path so it point to where x-stat.php is):

<A HREF="http://www.xqus.com/x-stat">
<SCRIPT LANGUAGE="JavaScript">
	<!--
var from = document.referrer; 
document.write("<IMG SRC=x-stat/x_stat.php?reffer=" + from + " border=0>"); 
	// -->
</SCRIPT>
</A>
 
2.6) Go to www.domain.com/path_to/x_stat_admin.php, to view the stats.

2.7) Send a mail to x-stat@xqus.com, and tell me where you are using the script (url), and what you think. (optional)

2.8) If you have problems, run the system_control.php to se if it can help you.

If you need help visit the x-stat support forums: http://www.xqus.com/cgi-bin/ib3/ikonboard.cgi

All bugs should be reported at: http://xqus.com/cgi-bin/bugs/bugs.cgi

############### 3. Extra configuration

If you want to add more toplevel domains, open x_stat_admin.php and go to line 29. Domains are seperated with commas.

If you want to disable/ ignore subnets or ip addresses, open x_stat.php, and go to line 29.
	If you want to diable one single ip:
		$bad_ip = array("123.123.123.123");
	If you want to disable two ips:
		$bad_ip = array("123.123.123.123", "456,456,456,456");
	If you want to disable a ip where one of the digits are changing:
		$bad_ip = array("123.123.123.*");
	You can use as many masks as you want, just split them with a comma and use quotes around them.

If you want to change the image that appears on your site, just edit the x_stat.gif.

Questions? http://www.xqus.com/cgi-bin/ib3/ikonboard.cgi
