Call us today. 816-221-4658

myKCnet  |  Web Mail  |  Members Only 

KCnet - Internet Access, Web Hosting, VoIP Telephone

  home  |  services  |  referrals  |  about  |  contact  |  support  |  sign up  

CGI Scripts and Custom Programming

Pre-built CGI Scripts
Server Settings
Active Server Pages (ASP, PHP)
Server Side Includes (SSI)
Databases (MySQL, Access)


Pre-built Scripts
All sites hosted with KCnet are provided the use of a cgi-bin.  KCnet provides all of our users with a couple of pre-configured CGI scripts to enhance your web page.  Select one of the following scripts for instructions on how to setup and use them:


Server Settings
The following settings may be required for your own custom CGI scripts.  These scripts must be located in your cgi-bin directory in order to execute properly.

 

Path of Mail Program

Full Path to Site

Path to Perl

Windows NT/2000

c:\winnt\system32\blat.exe

d:\inetpub\yourdomain

n/a

LUNIX

/usr/sbin/sendmail

/var/httpd/sites/yourdomain

#!/usr/bin/perl

LUNIX w/ Plesk

/var/qmail/bin/sendmail

/home/httpd/vhosts/yourdomain

#!/usr/bin/perl

*You must set permissions to executable (755) on Unix, however, it is not necessary to set permissions to executable on Windows NT/2000.


Active Server Pages (ASP,PHP)
ASP and PHP are tools that let you create dynamic web pages.  ASP/PHP-enabled web pages are treated just like regular HTML pages and you can create and edit them the same way you normally create regular HTML pages.   Web sites hosted on the Windows NT/2000 platform can utilize Active Server Pages or ASP.  Likewise, sites hosted on the Linux platform can utilize PHP.

For more information on ASP, please visit ASP101.com and for more information on PHP, please visit PHP.net.

Having Trouble referencing variables in PHP?

The following help page contains information on handling variable references in PHP with global variable references disabled:
http://www.php.net/manual/en/language.variables.external.php

For more information on security concerns with PHP and global variables, please review the following information:
http://www.php.net/manual/en/security.registerglobals.php


Server Side Includes (SSI)
Users hosting their website with KCnet can create documents which provide simple information to clients on the fly.  These documents are known as Server Side Includes.  Information can include the current date, the file's last modification date, and the size or last modification of other files.  In its more advanced usage, it can provide a powerful interface to CGI scripts.

If you would like server side include support added to your website, please contact our support department by email at support@kcnet.com or by calling 816.221.4658.

More information on server side includes can be found at http://www.apacheweek.com/features/ssi.


Databases (MySQL, Access)
Database connectivity is supported when you host your website on one of KCnet's Windows NT/2000 or Linux servers. 

Microsoft Windows NT/2000 Database Support (Access, FoxPro, Excel, Paradox databases) does not require a System DSN.  The recommended and more efficient method is to open the data source using a DSNless connection.  For information on setting up a DSNless connection please visit http://www.learnasp.com/learn/dbopen.asp.

Linux Database Support is provided via MySQL.  To setup and activate a MySQL database, please contact our support staff.  MySQL databases can be maintained through the control panel located at http://www.kcnet.net/phpMyAdmin/.  For information on setting up and maintaining a MySQL database, please visit www.mysql.com.
 


Adding a Hit Counter
To keep track of the number of "hits" to your website, you can add a page counter.  To add the counter, you will need to be able to edit the HTML source of your index.html file.  

Cut and copy the following text into your HTML source, for your KCnet personal homepage:

<IMG SRC="/cgi-bin/Count.cgi?df=username.dat" align=absmiddle>

Cut and copy the following text into your HTML source, for your Virtual Host website
(Unix Only):

<IMG SRC="/cgi-bin/Count.cgi?df=yourcompany.com.dat" align=absmiddle>

Replace username with your unique logon name with KCnet or replace yourcompany.com with your unique domain name.  Email support@kcnet.com with the subject line Initialize Counter. Within 24 hours your counter data file will be initialized.  The counter has many options that can be specified on the command line. For more information about its usage, refer to the documentation at WWW Homepage Access Counter.  This counter is designed to be used solely on our UNIX web servers,  if your site is on one of our NT servers, FrontPage provides a webbot that will perform an identical function.


Adding a Form Mailer
Available to KCnet subscribers, the following scripts, KCMailIt.pl for Linux hosted web sites and KCWinMail.pl for Windows NT or 2000 hosted web sites,  can be used to mail the contents of a filled out web form to a designated email address. 

KCMailIt.pl is provided automatically to all web sites hosted on our UNIX based web servers.  If your site is hosted on one of our NT servers, FrontPage provides a form handler with a similar function.  If you must have KCWinMail.pl please contact our support staff for the appropriate version required to run on our NT servers.

The following html code must be included in the form:

<FORM METHOD="POST" ACTION="/cgi-bin/KCMailIt.pl">
<INPUT type="hidden" name="subject" value="your subject here">
<input type=hidden name="recipient" value="your email address here">

Both KCMailIt.pl and KCWinMail.pl were derived from FormMail.pl.  Complete documentation on the FormMail.pl script is available at:
http://www.worldwidemart.com/scripts/readme/formmail.shtml.

Note:  In some rare instances, if your desired recipient's email address is an address outside of the domain of your website, it may be necessary for you to update the @recipients array in the script with this address.  Virtual Host users can find the script in  the cgi-bin folder of your website.   Personal website and Secure server users will need to contact us with this information.

More information on configuring the @recipients array can be found at:
http://www.worldwidemart.com/scripts/readme/formmail.shtml#recipients

© 1995-2007 KCnet, Inc. All Rights Reserved. Terms of Service, Privacy Policy