The program
"LNKINLTE.CGI" was written (and ©) by Ron F
Woolley, Melbourne Australia. Australian copyright is recognised/supported in over 130 countries per Berne Convention The
scripts and associated files remain the property of Ron F Woolley.
Ron Woolley, the author, MUST be notified via the addresses/URLs
below NOTE: If you use these files, you do so entirely at your own risk, and take on full responsibility for the consequences of using the described files. You must first agree that Ron Woolley / HostingNet, the only permtted supplier of this and/or accompanying files are exempt from any responsibility for all or any resulting problems, losses or costs caused by your using these or any associated files. If you disagree
with any of these requirements, Although this program script is free to
use, if you use it and find it useful, a donation to help continue this support and keep
new scripts / upgrades coming would of course be appreciated.
These
files can only be obtained via the above web addresses, and
check every few months for upgrades
History.... Added to 2.7 referrer checking (as an option). One new variable, plus changed old variable name "$the_path" to a more correct "$the_url" name. Added to 2.61 are aesthetic changes and javascript placement of link names / urls in editing boxes. Added to 2.6 are the admin options to edit link URLs, and reset link counts to zero, plus create correct hyperlink tag code for easy copy and paste into html. Upgrades from v2.5 only require the uploading of "lnkinlte.cgi" (with paths etc copied from the earlier version), and the uploading of "edits.pl" - no new variables have been added. Added to 2.5 is the ability to add and delete link names and urls via the viewer page with your browser. Several new variables have been added plus two new files. One is a 'require' file for the editing options, and the other holds an encrypted Admin password for adding or deleting links - typos fixed in 2.5b. Added to 2.1 is the hyperlinking of installed links on the viewer page. Now you can, from time to time, test that redirected linked pages have not been moved / removed. One extra variable has been added to the script for the hyperlinking to work. This program must be compiled by Perl versions 5+, on Unix servers with Sendmail
ABOUT All relevant files are supplied in one compressed .zip file that includes the recommended directory structure. It is assumed that the .zip file has been uncompressed to the directory structure included in the .zip file on your local computer. Then transfer of all files by FTP should ensure that correct line ending markers etc are converted during the File Transfer Protocol process. You MUST alter the script path, the webmasters email address and the list Viewer Access Password before FTP uploading the lnkinlte.cgi script, and change the important first line call command to Perl on your server (if required - see below). One CGI-BIN sub directory plus a data file also has to be created. LnkinLite enables you to not only supply external sources with your sites URL, but add a simple reference to the URL that will in turn update a count of each click through each time a URL is accessed. You could use LnkinLite for internal link usage counting also, but there is no security involved that ensures only your site pages are being used (instead of copies etc). Viewing Admin - referrer checking / blocking can stop EVEN YOU!
Creating Tags - Testing
Links - Admin This new generated window ( GET ) also includes a simple link which could be used in E-Mail letters for counted responses etc. Via admin the links can be tested at any time without adding to the click count. Local links ON your site can be referrer checked, blocking access from remote copies of your pages OR a browser command line. Editing
Links - Admin CALLING THE VIEWER / EDITOR
using the PASSWORD I have included an example
'lnkinlte.dta' file for you to configure and up load to the "lnkinlte"
sub directory (default). In this file you will identify three
example links, and they include the special "|"
vertical line character. The item pattern is as follows: Name|Link|Count, ie The second item in each record between the vertical line " | " characters is the URL the script is to send the person to once the click (script access) has been recorded
For INTERMEDIATE installation experience - Help / Advice information is available. The CONFIGURATION VARIABLES in DETAIL You must adjust the variable values included at the start of the script just below the header. Of these the second, third and last (shown in blue) should be left as is for a recommended setup ie. #-------- ALTER THESE VARIABLES
ONLY! --------------------------# URL TO THE SCRIPT If occasionaly checking for broken links via the links list viewing page, clicking on the listed URLs will open a second browser window, leaving the list on screen underneath. Testing with this option will not add any click-through counts to the records. CHECKING FOR CORRECT REFERRERS - Bad Referrer, Access Denied! This option in the script allows you create an "array"
of Domain names and IP numbers that jmpncnt.cgi will respond
positively to. By including the acceptable calls to your pages
and/or your IP#, ie 'www.yourdomain.com' and yourdomain.com'
you effectively stop improper use of your lists and admin from
distant sites (entries are only accepted from your site, not
remote copies of your pages elsewhere they try all the
time). The array is named "@referers" and you simply (MUST) enter your
preferences in place of the examples. NOTE: The brackets, quotes
and commas enclosing each item must be included else an error
will occur, ie: This will block acces via a browsers command line AND remote copies of pages containing links to the program - EVEN YOU !! At this point I will bring your attention to the semi colons ( ; ) appearing at the end of each variables. These MUST remain else an error will occur. PATHS TO FILES ACCESSED
BY SCRIPTS This script uses a 'require'
file when the viewing and editing page is loaded. This script uses a different
password for editing - the "admin" password. NOTE: Double check ALL permission's (below) before changing the default paths. Unless you know in advance through experience what the paths could be, do not change the default. WEBMASTERS E-MAIL ADDRESS NOTE: The backslash ( \ ) is very important for Perl 5 users. All string references that include the @ character must insert a backslash before that character. ACCESS PASSWORD ADMIN PASSWORD LINKS The Admin page can be used to generate each link tag (via a new window) with a simple click for a "copy & paste" of the tag into html code. The "GET" hyperlink to the left of each link data line will do that. Next to the GET link is a simple JavaScript link ( "ED" ) which places the relevant link name and URL in the edit boxes. So the following are descriptions of how the link set-up works. LINK USAGE RECORDS
and HYPERLINK CALLS <a href="http://yourdomain.name/cgi-bin/lnkinlte.cgi?l=3">hyperlink</a> NEW v 1.7 By adding the "." character as the FIRST character of a link name then that link will be referrer checked - IF wanting to confine link access ONLY via pages ON your site ( and not remote copies OR browser command lines ).MENU If sending a link URL to someone placing a link TO your site FROM theirs, create the link via admin as explained here and then send them the full URL with the new linkname included as above. Note: The link name (l=??? ) should only be ONE WORD. If not, Netscape may respond with an error. HOW In the three examples above, the question mark denotes the start of the query string that follows it. The "l" is a lowercase "L", NOT a numeric 1. The "l" tells LnkinLite to handle the query as a hyper(l)ink. After the "=" sign is a number in the first example and a word in the other examples. I have shown this so you can see that this is indeed a name, and numbers could be used while words would be more descriptive. The name should refer to an identical name entered in the link list data file, 'lnkinlte.dta'. For INTERMEDIATE installation experience - Help / Advice information is available. INSTALLING A utility script, makedir.cgi, is included to automatically setup the required sub directory of your CGI-BIN and create an empty data file ready for you to upload (ASCII format) the sample that can be used for testing. This script is set up ONLY for the recommended default directory structure see below. For those users with little experience installing Perl CGI scripts, I have also included a utility script that can be easily installed first and run to test the path to perl and the perl version your server is running by default. THIS SCRIPT IS FOR PERL 5+, ON A UNIX SERVER USING SENDMAIL. THE PATH TO PERL FILE PERMISSIONS UP LOADING FILES (Posting) By far the biggest problems faced when installing scripts are firstly the file transport encoding used and secondly the permissions settings set for both files and new directories. Bitmap images must be sent to the server using the "Binary" protocol. Text files, ie html pages, CGI SCRIPTS, text data files, and require files, MUST be sent in "ASCII" format. Failure to do this will result in a server failing to recognise and execute the scripts. Although often referred to as programs, scripts must be compiled before they do anything. As an example, files with the .EXE extension on programs that are installed on Wintel machines are pre-compiled binary executable programs. Perl scripts on the other hand are compiled in memory by Perl before they can be executed. The script (text) must be in ASCII text format for the interpreter to be able to read it. REPEAT: Up load scripts and text files as "ASCII" files, images as "Binary".
So, assuming the default directory structure is used, you will up load into:
A Link to the LNKINLTE.CGI count viewer/editor page UTILITIES Webmasters Page - the
2 methods to Admin UTILITY testbin.cgi The new version of tesbin.cgi attempts to ascertain server paths to all Perl versions and paths to Sendmail. Either or both of these may not be listed depending on server set-up. Testbin.cgi also now allows you to check your path to perl by attempting a mail out. To do this change in the code near the top the URL to the testbin.cgi program. So! UTILITY makedir.cgi
Try installing and running this script first. It will report success or failure when creating the files/directories and prove the correctness of your Perl Path", plus indicate that the default relative paths will work OK. If the default urls/paths are not used, then you will have to change them first. To use it, make sure the "Perl Path" at the top of the script is correct. NOTE: the default Dir/File permissions are set to 766. Change these values to 777 if your site so requires BEFORE running the script. If running the script is successful, you only have to FTP your supplied files over the new empty ones. (note: for security reasons, makedir does NOT prepare an empty file for the cgi scripts, you must upload them (as ascii) and set chmod 755 your self) Once run, delete the file immediately because it has no input protection and could be run again by some low-life wanting to cause mischief So! Place "makedir.cgi" in your cgi-bin directory and chmod 755 (7=r+w+x, 5=r+x). Then run from a browser command line, ie: http://www.yourdomain.path/cgi-bin/makedir.cgi Enjoy - & please let me know
how you get on with this script, how/what server type it installed to. |