uvisit (unique visitor counter) by Saboteur [saboteur@kolumbus.fi] www.saboteurweb.com notice: this script has been repackaged on October 15th 2003. I have rewritten parts of this readme.txt, but no changes to the script itself has been made. /* How to install UVisit? */ I made an effort to make installing uvisit as easy as possible for you. All you need to do is to copy all the files in this package into the location you desire (I recommend putting it in the same directory where you keep the page(s) where you'll use the script, you'll see the reason below...) and run setup.php in your browser. After that you should be ready to go! Please note that you should place these files into the directory from where you will be running the script! (In case it is not obvious, you can place the datafiles wherever you want, that's why the setup asks you for their desired location). You need a server that supports PHP 4.2.0 or higher for this script. register_globals can be OFF in your php.ini. **IMPORTANT** note for Linux users: In order for the setup to work properly, you need to make the following chmod changes: - uvisit_counter.php must be writeable by everyone (or the webserver) - the directory where the setup is performed must be writeable by everone (or the webserver) - the directory where the datafiles will reside must be writeable by everyone (or the webserver) ALSO NOTICE that the datafiles will not be created until the first time you run the VisitorCounter()-function. /* How to use UVisit on your site? */ First, choose the page where you want to place the counter. Make sure it is parsed by PHP (usually it must be of the type .php). Add the following line to it: You will need to use a proper path for uvisit_counter.php there, so pay attention to where you placed it originally. The line above will work if you placed the script into the same directory as the page in which you're going to use it. That line will print the current number of visits to your site as well as increment that number if the current visitor is new. You can use something like the following in your .php:
You are visitor #
That's it! Just one line of code and a quick setup script run. UVisit will create the necessary datafiles by itself. /* What to do when things go sour? */ There shouldn't be big problems if you make sure you get your chmod settings right. But if problems persist, I'll gladly help. Contacting me is easy enough - just drop me a line at saboteur@kolumbus.fi or visit my website and its forum at http://www.saboteurweb.com/