Ozzu Webmaster Forum
Free webmaster help for designing, programming, cgi, servers, linux, and more

Produced by Unmelted, LLC


This section describes how to use the script and how to customize it to meet your demands. The script uses what we call template files in order to make it customable to any type of webpage you may have. The following sections will describe pretty much everything that is required to make the best use of the script.

This is really one of the best parts about this script. We use what is known as template files which basically allows you to keep the design of your site exactly how it currently is. Template files make it easy to integrate this script into and allows you a great deal of options that many other scripts could never handle. Template files basically work like this. Lets say on your site you have a particular page that you wish the script to update and it is called index.html -- To create a template file you take an exact copy of your index.html file and call it something like template.html or template01.html -- It can be whatever you want. The template file is the file that the script will read from before it actually writes to your final page index.html -- Once you have specifed in the options area (we will discuss later) which file you wish to update then you should no longer make changes to your site by updating index.html anymore because the script will simply ovewrite those changes when it updates itself. To make updates to your site you would then update template.html as that is the actually page the script reads from before it makes any changes. Within the template file you can place special codes which the script will understand and replace with referring site urls, title, hits and many other things. One example could be the code ##URL1## or ##URL2## . The script will recognize this code and replace it with the url of whatever the current url is for that rank. Below is a table of valid codes that the script can understand. In the chart below the number 5 can be replace with any number you want. It represents the current ranking number of a site. Some of the codes below do not need a ranking url to work with.

##URL5## Inserts the url of that rank
##TITLE5## Inserts the title of that rank
##TARGET5## Inserts the target of that rank
##HITSIN5## Inserts the unique hits in for that rank
##HITSOUT5## Inserts the unique hits out for that rank
##RANDOM## Inserts a random url
##RANDOMNAME## Inserts a random name matching the random url
##UPDATECLOCK## Inserts the time the script last updated
##TUNIQUES## Inserts a number representing your total uniques
##TRAWS## Inserts a number representing your total raws

To login to your admin area you should goto


It will prompt you for a password. The default install password is "admin". We strongly recommend you change this password before you take the script live. We will explain how to change your password further down this page. Once you have typed in your password it should bring you to the main page of the admin area. If you entered a wrong password it will notify you and prompt you again for a password.

Once logged in you will see a page that has a table with blank entries. Eventually those entries will fill up but at the start they should be blank. On the bottom of the page you should notice a faint arrow on both the left and right side of the pages. When your page fills up with data those buttons will become active and will allow you to display different rankings within the script.

In the middle towards the bottom of the page you should see a spot which shows the total amount of unique visitors you have recieved for that day. Each day that value will reset.

Below the total visitors amount you will see scroll menu which has many different choices to take you to different areas within the script. Later when you select something on that list you will hit the EXECUTE SELECTION button immediately below it to perform that function.

The last area which we have not talked about yet is the large table that will display the sites sending you traffic. The table is divided up into six columns. The very left column has radio buttons which allows you to select a site that you wish to work with. You can only select one site at a time.

The second column lists the ranking number for that site. All sites are ranked according to how much traffic they have sent.

The third column lists the referring url that is sending you traffic. The displayed url also links to the site which makes it easy for you to see how they are linking to you. An important note is that the full url is always displayed in this column unless the url exceeds 60 characters in length. If it does exceed 60 characters the an asterick will be displayed in front of the url letting you know that is not the full url. The shortened url will still link to the full url.

The fourth column displays either the name of the site or "SITE NOT ACCEPTED YET". At the beginning when you first start counting traffic every site will start out not being accepted. To accept a site all you have to do is name it and then it will be accepted.

The fifth and sixth column displays the unique hits in from each url and the unique hits out from each url. Note that the default setting for hits out is turned off which means that column will display zero for each site unless turned on. We will talk about changing options later.

The following sections will go into detail on using the different menu operations.

This is a fairly simple, but useful function. The re-rank button allows you to rerank the sites as soon as you hit the execute button. Normally the script updates the referrer stats both in the admin area and all your pages every 10 minutes by default. Later we will explain how to change that default setting.

Clicking this option on the menu bar will take you to another screen which shows a graphical interface displaying how many uniques and raws you have received for that day and all the past days. This area will also predict how much traffic you will receive for the current day based on how much traffic you have been receiving all day.

This link is cool because it will allow you to see the totals that each of your top referrers sent for the day before. This can give you an idea on whether a referrer is sending you more or less compared to the day before.

This one is hard to explain, but it is extremely useful. Normally the script will list the exact referring urls by how much they send you. So if you are sending traffic from more than one url on the same domain those will be listed separately. So for example lets say I am sending you traffic from http://www.bigwebmaster.com/main.html and http://www.bigwebmaster.com/other.html . Since both those links are sending you traffic they would be listed separately on the toplist and ranked accordingly. This is where Identities come in. You can tell the script to always add those urls together and linkback to whatever url you tell it. This will give the referring site an overall higher ranking as well because it added the to referring urls together. When you click the CREATE IDENTITY button it will ask for an identity code. This is basically whatever you want to call it. Nobody else will see this except for you. The code is basically there to keep the identies distiguished from each other. The spot you will need to fill in is the linkback url. This is the url that you want to send traffic back to. So for example earlier we mentioned the two urls we would be sending you traffic from on bigwebmaster.com . Lets say we did not want to link back to either of those pages because they are both part of frames. Well for the linkback url we could specify the link as http://www.bigwebmaster.com/index.html which would take it to the appropriate page. The last spot to fill in on the CREATE IDENTITY page is the site name. This is what you want the link to appear as on your site. Once finished hit the Create the Identity button. Note that this has successfully created the Identity but you still have not specified what specific referring urls make up the identity. We will discuss that in the next paragraph.

Once you have created an IDENTITY you will need to specify what sites make up the identity. On the main page you need to select the first site you wish to add by marking the radio button next to the url. Once you have selected the url click on the menu and highlight ADD SITE TO AN IDENTITY. Then hit execute and it will ask you wish Identity you want to have that url added to. Pick the appropriate Identity and hit the ADD SITE TO AN IDENTITY button to have it added. If you wish to have more sites added to the Identity simply find another referring url and repeat the steps in this paragraph. The more referring urls you add the higher the Identity will move up in the ranks. Also note you can distinguish between regular sites and identies by looking at the referring url on the main pages. If the referrring url in the admin area has a [ident code] then that is telling you that it is an identity. The "ident code" is the abreviation you assigned the site earlier.

This is fairly usefull because it allows you to see what sites make up an identity. On the main pages in the admin area if you see a [ident code] next to a url then it means that it is an identity and that you can view its contents. Simply select that site by marking the radio button and then on them menu on the bottom of the page select VIEW SITES IN IDENTITY and hit EXECUTE. The following page that appears will show you which urls make up the identity and how much traffic they are sending from each url. The traffic from each url is what makes up the total hits in for that identity.

This option you will be using a great deal. This is how you accept sites normally. The only time you would not accept a site using this method is if you are going to create and identity for this referring url. To use this option simply select the site you wish to ADD/EDIT. Once you hit execute you will notice that it will allow you to edit the site title and the amount of hits that have been sent in for the site. Once you name the site it is automatically accepted. You can also use this option later if you wish to rename a site or modify an IDENTITIES title.

This allows you to remove a referring url from your ranking list. Note that is the site you deleted is still sending you traffic they will eventually regain their position. If you wish to totally prevent a site from being displayed on your site then the next paragraph is for you. This delete selected site option can also be used to disassemble an IDENTITY. So for example if you have an identity and within the Identity are 5 referring urls then when you delete the identity the 5 referring urls will come out of the identity and will be displayed according to how much traffic each one is sending.

This link will totally ban a site from being displayed in the admin area and on your site itself. This is useful if you do not want a particular site to be displayed on your site or if you are getting a great deal of traffic from one particular search engin (or more) and you do not want it being displayed.

This link will take you to an area which displays all the sites you have banned. Once inside this area, if you wish to unban a site mark the radio button and hit the button that says UNBAN SELECTED SITE.

This link will allow you to change your passord that you use to enter the admin area. I strongly recommend you do this as soon as possible because the default password is admin, and anybody could get in easily because it is known.

This is a fairly big area as there are many different options which you can customize. We will break the areas up below.

This area specifies the location of the script on your server. You should not have to mess with this area but it is there for advanced users. The HTML DIRECTORY PATH specifies the path on your server to where your normal directory is for html files. The next box which says URL FOR HTML DIRECTORY is the actual url to where you html files are located. The third box says CGI DIRECTORY PATH and this specifes the server path to where the Ultimate Topsite Script is kept. The last box says URL FOR CGI DIRECTORY and is the actual url for where you Ultimate Topsite CGI files are kept.

This area defines the name of some system files. There is no reason to change anything in this area but again it is there for advanced users to keep the script very customable. The first box in this area says VISITOR LOG. The name of this file is where the recent temporary stats are kept until the script updates itself, then this file is cleared and records start recording again. The next box says SITE TRACKER LOG and specifies the name of the file that will keep your entire stats file for in uniques and raws. This is probably one of the most important files and if the records in this file are loss then you pretty much have to start your database over. The next box is DATE TRACKER LOG and is a simple file which compares the date recorded to the real date to determine when a new day has started. If a new day has started it will reset all the referral stats back to zero. The fourth box says EXIT.LOG and is where all your recent out hits are kept. When the script updates itself it reads the file and compiles it with the stuff in the next box that says EXIT TRACKER. The exit tracker is a record of the total out hits for the entire day for each referring site you are sending traffic to.

This area is very important as it concerns the security and safety of your tracker files. In this box you specify the url(s) that you only want permission to load the script. You should only specify your own site. This will block anybody else from loading your script in things such as image tags or iframes. An important note to remember is that the example urls http://www.bigwebmaster.com and http://bigwebmaster.com are different urls so they should be both entered in this area as both those urls should be able to load your script to count referrals. For each site you list in this area simple separate them by commas.

The first box in this area says PAGES YOU WISH THE SCRIPT TO UPDATE. These are the actual file names that you want the script to completely write over. Each file name should be separated by commas and it is important to have them match the order of the next box for template files. The script will basically read whatever is on your template file and write it to the file(s) you have specifed in this box. So in the next box that says TEMPLATE FILES FOR PAGES TO UPDATE you should place each template you have created separated by commas. Again thes files should be in relative order compared to the box right above it.

The box which says NUMBER OF SITES TO LIST ON STARTUP basically tells the script how many sites you want displayed to work with. It has nothing to do with what is actually displayed on your site. It only deals with the actual admin area and allows you to list more or less sites according to your preferences.

The first box in this area says ADD SITE TEXT. This is the text that will actually be displayed on your site when all the available ranks are not filled. So for example lets say you list the top 25 on your site. If you only have 15 referrers then the remaining 10 sites will display this text that you have in the options area and link to the url that is specifed in the next box, ADD SITE URL. The third box is target window for the ADD SITE URL. If you wish for this link to replace the current window then you would place _top in this box. If you wish it to open in a blank window then you would place _blank in this area. Or if you wish it to be placed in a named window you would put the name of that window here. The next box says NEW REFERRER TEXT. When a site sends you traffic and they are ranked high enough to be displayed on your site it will display the text that you have in this box, until you name the site to something different. The following box is REFERRER TARGET which basically specifies the target for all your referring urls. Usually this is kept to _blank so that all your linked sites open up to new windows. The next box says COUNT EXITING TRAFFIC and by default it is set to zero (off) , which means that unless you change this to 1 it will not count exiting traffic and in your stats area all the stats will say zero. The next box says AUTOMATIC SITE UPDATER and specifies how often the script automatically updates the referral stats in your admin area and on your site. The value specified here is in minutes. The next area says TIME ZONE and is used so that you can set it to your specific time zone so that things are running by your clock. This also requires that that your server administrator has set the time right on your server which has been done with most hosts. If your host is behind or is maybe kind of new you may notice that your time is not matching right and that is because they had never set the time to begin with. The next box says POST SITES NOT ACCEPTED YET and is a pretty important box. For example when someone starts sending you traffic by default they will show up on your sites as soon as they have sent enough hits. The will show up as NEW SITE or whatever you have specified for that option. If you do not want sites to show until they are actually named by you then you should set this option to 0. The next option says RANDOM SITES REFERERENCE POINT and is kind of hard to grasp at first. For example lets say you specify 10 for the reference point. Then in the next box which says RANDOM SITES CHOSEN WILL BE either less or more than that point above.

Some of the areas above are hard to grasp at first but once you start playing around with all the many different options you will soon find out how easy it is really to operate. Some scripts out there created by other companies may be really easy to explain to run, but they are also very uncustomable leaving you barely with any options. This one gives you a great deal of freedom letting you keep the design of your site however you want it to be.

If you are a member and you are having any problems grasping a concept or understanding how a particular function works we will be happy to help free of charge.


Webmaster Resources - Webmaster Forum
Guestbook Script - PHP Trivia