/***************************************************************************
 *
 *   RobotStats
 *
 * Author:   Olivier Duffez, WebRankInfo ( http://www.webrankinfo.com )
 * Version:  1.0
 * Date:     2003-10-11
 * Homepage: http://www.robotstats.com    
 *
 ***************************************************************************/

Installation: instructions

1- Uncompress the file 'robotstats.zip'. A directory named 'robotstats'
   should be created.

2- Edit the file 'admin/config.php' with a simple text editor like Notepad and
   replace the 4 following elements by the real values (if you need help you
   may ask your host provider): 
   - "HOST"    : the MySQL hostname
   - "LOGIN"   : your login
   - "PASSWORD": your password (to access the database)
   - "BASE"    : the MySQL database name
 
   Fill in your email address (this address will be used to send you the Full
   Crawl alerts or to warn you about MySQL execution errors) : variable
   RS_ADRESSE_EMAIL

   The options of RobotStats are configured by the following variables.
   If you want, you may modify some of them:
    - RS_URL_REWRITING   : put "y" if you're using it, otherwise "n"
    - RS_GRAPH_SCALE     : put "lin" (linear) or "log" (logarithmic) for the
                           scale of the graphs
    - RS_VALEURS_GRAPH   : put "y" if you want to display the values on the
                           graph. Otherwise put "n"
    - RS_SET_EXEC_TIME   : put "y" if you want to set a maximum execution time
                           for the graph script. Otherwise put "n"
    - RS_TEST_FULL_CRAWL : put "y" if you want to detect when the Full Crawl
                           begins and to be alerted by email (the email will be
                           sent to the address ADRESSE_EMAIL).
                           Otherwise put "n"
    - RS_SEND_ERROR_MYSQL: put "y" to receive emails when an MySQL error
                           occurs. Otherwise put "n".

   To customize the installation, you can also modify these variables:
    - RS_LANGUE           : put "en" (english), "fr" (french), "de" (german),
                            "es" (spannish), "it" (italian), "nl" (dutch)
    - RS_TABLE_LOG        : name of the MySQL table used to store the visits
    - RS_TABLE_ROBOTS     : name of the MySQL table used to store the robots
    - RS_NB_J_DET_FULL_CRAWL: for the Full Crawl detection: an alert is sent to
                            warn the webmaster that the Full Crawl has begun as
                            soon as a Full Crawl robot's visit is detected and
                            no visit of the Full Crawl robot has been recorded
                            in the last RS_NB_J_DET_FULL_CRAWL days.

3- Transfer the whole directory 'robostats' by FTP to your server.

4- Protect the directory 'admin' with a '.htaccess' file and a '.htpassword'
   file. If you need help ask your host provider or read this detailed article
   (in french):
   http://www.webrankinfo.com/articles/htaccess-restriction.php

5- Installation:
   * If this is the first time that you install RobotStats, go to the URL
     http://__your_site__/robotstats/install.php and follow the instructions.
     Once the installation process is over, delete the file 'install.php' from
     your server.
   * If you already have installed a previous version of RobotStats (that was
     named GoogleStats), you should begin with backuping the MySQL table
     'gs_log'. Then:
     If you already have installed the version 2.0 or later:
       - backup the file admin/config.php
       - copy to your server all the files found in the robotstats.zip file
       - edit the new admin/config.php file in order to update your personal
         settings (there are several more settings...)
       - go to the URL:
         http://__your_site__/robotstats/update.php and follow the
         instructions. Once the installation process is over,
         delete the file 'update.php' from your server..
     If you have already installed an older version of GoogleStats, you must
     do the complete install of RobotStats.

6- Now you must insert the following code in each page of your site (apart from
   the pages you don't want to be analyzed). If you're using Dreamweaver (or
   any other software supporting templates), you can insert this code in your
   template. In this case, use the code display and insert this code in a
   non-editable zone (ie outside a section between "<!-- #BeginEditable" and
   "<!-- #EndEditable -->"). You can insert it just before the "</head>" tag.
   You can even add it after the </html> tag if you want.

   <?php
   include($DOCUMENT_ROOT.'/robotstats/robotstats.inc.php');
   ?>

7- To test if RobotStats is correctly installed, enable the robot named
   '_test' and browse some pages of your site. Then look at RobotStats to see
   if your visits have been recorded. Don't forget to disable this test
   robot (see the description of RobotStats in the file
   'doc/en/robotstats.txt').

8- You're using RobotStats and you don't have anything to pay: it is FREE.
   All I ask to you in return is only to put a link on your site to the
   RobotStats official homepage:
   <a href="http://www.robotstats.com/" target="_blank"
   title="RobotStats analyzes GoogleBot's and other robots' visits">
   Robots tracking and statistics</a>

   Thank you!
   Enjoy RobotStats!