//Top 10 Referrer Script\\
First let me give credit where credit is due. I found this script at http://obiewebsite.sourceforge.net and God bless him because I spent almost 2 weeks searching for it.
You will need to be able to CHMOD for this script to work. Also this script has to be placed in a php page. What I mean by that is your page has to end in .php such as index.php
OK first you need to download the zip file.
Make a folder on your desktop named referer and extract all files (3 total) into that folder.
Upload the files to your main directory. What I mean by this is, upload it to the same directory you have your index in. In other words do not put it into a folder.
Once you have your files uploaded click to edit topreferers.php file.
Make maxitems=100
maxref=10 you can make this 5, 10, 15, 0r 20 depending on how many you want shown, I chose 10.
The next part is the only tricky part. Now to be the "nice" person that I am, I left my actual server path in so it takes out all the guess work. On the username and password, just add your name and make up a password.
//***SERVER PATH to '/home/trixie/public_html/refs.db' file
NOT 'http://mydomain.com/bin/obiereferer/refs.db';
$reffile='/home/trixie/public_html/refs.db';
//***Admin username and password
$admin_username='Yourname';
$admin_password='yourpassword';
Save the page.
Now for the refs.db file Obie says to CHMOD it to 744. This did not work for me, I kept getting that annoying script error so I CHMOD mine to 777 and it worked. Try 744 first because that is what he says to do, but if it doesn't work then try 777.
Now in your browser type in www.yoursite.com/topreferers.php?admin=login
Type in your user name and password, the control panel will show the size of your database, if it's too large such as greater than 300 you can reset the database.
Now to add the script into your page ( you do not need to modify it), and remember it has to end with .php use one of the following codes.
<? include "topreferers.php"; ?>
or
<? if(!$QUERY_STRING) include "topreferers.php"; ?>
It is best to add this to the bottom of your page just before the </body> tag.
If you have an index page like I do that links to your main page, example:(800x600 or 1024x768, I have 2 different enter pages) then you will need to add the script to the index page because if you don't then all your referrer links will come from your index page and not from other sites and it would make the script pointless.
I had my index page as index.htm and I had to change the name to index.php so the script would work, but as long as you have the one index page no matter what the ending is (.php, .htm, .html, etc..) it will be OK to change it.
|
|