What's new in version 0.5 - Chops the query string so referrals with a query string don't count as a separate referal. - New top10 function which prints a table of the top 10 referring sites. (total/daily) Ok, you should of received the following files in the zip I emailed you to get the script up and running :- 1. adminref.php 2. referrals.php *has the outline php code* 3. phpcgi.inc 4. make.php 5. topref.php 6. readme.txt If you don't have all these please email me. README CONTENTS --------------- 1. Installation ------- Make database ------- Set user and pass ------- Upload Files ------- Make tables 2. Administration Overview ------- Totals N.B. If you have any problems with getting this program to work please :- 1. Exhaust this README file. [No Luck ?] 2. Email me with the problem (Be as specific as possible) [No Luck?] 3. If you still can't get it to work AND you are sure you have access to php3+ and mysql AND have a database set up for proreferral... email me with your ftp server, username & password. I can not promise anything but I will definately take a look. # # $-------------------------------------------------------------------------------------------- # # I N S T A L L A T I O N - D A T A B A S E # # $-------------------------------------------------------------------------------------------- # The first thing you must do is create the database. This is most integeral part of the whole program so you can't skip it ;) I assume there are two ways to do this, if you have access to mysql but can't set up your own databases then ask your administrator to set one up for you called 'referrals'. Secondly if you have mysql root access to the mysqladmin program then you can set it up yourself using the following command: mysqladmin -u root --password=*rootpass* create referrals It should tell you that 'referrals' has been created. Thats it ! I hope you managed to set it up properly and now you can move on to the next section. # # $-------------------------------------------------------------------------------------------- # # I N S T A L L A T I O N - C R E D E N T I A L S # # $-------------------------------------------------------------------------------------------- # The next step is to set the $dbuser and $dbpass up. We need to confirm with mysql that we are who we say we are. To do this open up phpcgi.inc (which you should of received with this zip file) and look near the top of the script for two variables: $dbuser = 'root'; # username used to connect to mysql $dbpass = ''; # password used to connect to mysql Change those variables to your mysql username and password... your almost there ! Also, while your in phpcgi.inc you can edit some variables to make the script look more like the rest of your site by editing the top part of the file which looks like: $PREF = array ( VLINK => "#FF6666", # Visited link colour BGCOLOR => "#FFFFFF", # Page Background colour LINK => "#D55304", # Link colour ALINK => "#FF6600", # Pressed link colour BODYTEXT => "#330033", # Text colour TBCOLOR => "#C6D7FD", # Table colour RESHADE => "#94B3FC", # Reshaded table colour GIF => "/imx/cougasoft.gif", # Any logo (placed at top of some pages) ERR => "RED", # Error colour (n/a) TARGET => "", # (n/a) HOME => "http://www.cougasoft.org/", # Homepage URL PERPAGE => 25, # Amount of referrals per page ); # # $-------------------------------------------------------------------------------------------- # # U P L O A D I N G - F I L E S # # $-------------------------------------------------------------------------------------------- # Upload the following files:- No. Script|GIF Where Chmod to ---- ---------- ----- -------- 1. make.php /proreferral/ - 2. adminref.php /proreferral/ - 3. phpcgi.inc /proreferral/ - 4. referrals.php /proreferral/ - 5. topref.php /proreferral/ - [Ques: So Paul, how do you upload your scripts ? ]. [Answ: Good question :) here is how and what I use :- 1. I open WS_FTP95 [http://www.ipswitch.com] 2. Log on to my server 3. Upload php|inc files to my directory in ASCII mode. - If you upload in binary the php script may not work. 4. There is no need to chmod php scripts, they are just like html (or even more like .shtml) 5. Check the script in my browser for any errors. 6. Log off. 7. Have a nice cup of coffee and bask in my uploading glory :) # # $-------------------------------------------------------------------------------------------- # # I N S T A L L A T I O N - T A B L E S # # $-------------------------------------------------------------------------------------------- # You should of received a file called make.php, this simplifies the chores of setting up the table and column names for you and there are two ways of running it: 1. From the telnet prompt: php make.php 2. From the internet: http://www.domain.com/proreferral/make.php It should print out "All done" and from there make.php is no longer needed so you can delete it from your server. # # $-------------------------------------------------------------------------------------------- # # A D D I T I O N A L - I N F O # # $-------------------------------------------------------------------------------------------- # NOTE: Once these stages have been completed correctly the program won't quite work properly, you still need to add the code from referrals.php to your own php files. Open referrals.php and get familiar with the code, from it you should be able to work out how to insert it into your own files and at the bottom of referrals.php it tells you how to use the data obtained. The php file: adminref.php *should* work properly though, if you have uploaded phpcgi.inc (and added your mysql username and password) into the same dir as adminref.php then it should work without having to do anything. Because you have just set the program up it shouldn't print any data, just the "todays referrals" page should show up with an empty table. # # $-------------------------------------------------------------------------------------------- # # A D M I N I S T R A T I O N, T O T A L S # # $-------------------------------------------------------------------------------------------- # This is a very simple administration and therefore there is no username and password to confirm, just click on the totals link under the top graphic. The page which loads contains the total referral counts. # # $-------------------------------------------------------------------------------------------- # =========================================================================================== # $-------------------------------------------------------------------------------------------- #