Installation Guide

Script Name CJ Users Online v1.0

Files Required: setup.php (once ran - delete!)
config.php
users.php

Installation 1)  MySQL Database Set-Up.

Unfortunately we cannot set-up your database for you, sometimes you already have one database set up on your web-space account, sometimes you can go into your web-space account and navigate to a "Create Database" area and sometimes you have to ask your web-space provider to create one for you.  If you haven't got one already created call it "database1Remember, this is the DATABASE not the TABLE!

Once you have a database created, you can go on to step 2...

2)  Variables to edit in config.php

a)  Your mySQL Server, most cases "localhost"
$server = "localhost"; 

b)  Your mySQL Database Username 
$db_user = "joe_bloggs";

c)  Your mySQL Database Password 
$db_pass = "password";

d)  Your mySQL Database Name  
$db = "database1";

e)  Time to reset IP address's value in seconds, default here is 120 (2 minutes)
$to_secs = 120;


3)  Upload

Upload all the files required (see above) into a directory preferably called "usersonline" so your link to users.php would be www.yourdomain.com/usersonline/users.php

4)  CHMOD Folder

If you understand how to CHMOD a folder then change /usersonline folder to 777 (writable by all)

Why?
We have to CHMOD the folder so we can run setup.php with know difficulties!  It is NOT Necessary to do this BUT If you dont it will mean MANUALLY deleting setup.php from your server once you have ran it!


5)  Run SETUP.PHP

You are ready to automatically create the database!  To do this go to the destination of your setup.php file, usually www.yourdomain.com/usersonline/setup.php. This will run the setup script and take you to users.php afterwards.  If you get errors it will be sometimes to do with CONFIG.PHP so go and check your connection variables!  If you get the error message "Unable to delete Setup file.." then you didn't do Step 4!  No worries, go and delete setup.php manually!

6)  Linking to users.php!

After creating a page in which you would like to show how many users are online (usually your index page) you will then need to INSERT the users.php file within it.  This can be done using PHP or SSI!

a)  How to create a link within a PHP Page (.php, .php3, .php4)

To create the INSERT using PHP use this code:



NOTE: You may need to change the path to users.php (to be certain you could enter the full path!)

b)  How to create a link within a SSI Page (.shtml, .shtm)

To create the INSERT using SSI use this code




Once you have added the code to the page, upload the page!


Finished Thats all!

If you have any problems with the script go to www.cj-design.com/?id=forum and seek advice!

Donate Show your appreciation for this script by donating : ) www.cj-design.com/?id=donate

© CJ Website Design