UST's Self-Help Center - "Working with
CGI Scripts" CGI-BIN/Scripts
Pre-installed CGI scripts
CGI-BIN/Scripts
UST provides Do-It-Yourself CGI scripts you can install on your server. Keep in mind that CGI scripting is a programming tool. Problems resolving from these and other CGI scripts are not covered under technical support.
If you need help installing or writing custom cgi scripts UST has a group of programmers who will get you up and running at a minimum cost. cgihelp@USTeam.net Programmers receive $80.00 per hour with a minimum charge of $20.00 ($20.00 covers a majority of the problems).
Forms
UST's servers are pre-configured with a 'fmail.pl' (form mail) script in your CGI-BIN. This script is designed to process any forms that you write for your site. No knowledge of CGI is necessary to implement a working form on your website.
Add the following 4 lines to your form document and your form will send the information to the specified e-mail address.
<form action="/cgi-bin/fmail.pl"
method="POST">
<input type="hidden"
name="recipient" value="email address to receive form info">
<input type="hidden" name="subject"
value="Name of form-Order Form">
<input type="hidden"
name="thankurl" value="http://yourdomain.com/thankyou.htm">
The above 4 lines need to be placed at the beginning of your HTML coding that starts the forms. The above 4 lines declare that the forms in your HTML page will be processed by the fmail.pl script in your CGI-BIN (Line 1). Then, the 2nd line tell the form script to send the completed forms to the specified recipient (your e-mail address of whomever's you set it for). The 3rd line tells the form script to place the declared subject line into the form sent to the recipient via e-mail. The 4th line tells the form script to send the visitor filling out the form to a page thanking them for filling out the form. These are the only codes you need to interface with to get the forms working.
Don't forget to create a 'thankyou' page for your form.
Please note that if you DO NOT want to use the
"thankyou.htm" you can specify:
<input type="hidden" name="thankurl" value="no">
(this will display a default thank you page for you, saves some HTML coding)
Also, the place in your HTML code where you ask the visitor for their e-mail address change the coding to reflect something like this:
<input type=text name="username">What is your e-mail address?
The key parameter is the name="username". This
will take the e-mail address from the form and place it into the e-mail form that is sent
to the recipient (declared in Line 2 of the form coding). Otherwise, the recipient will
receive mail from "No-Email-Given@whatever.com" (a null used in the form script
if no e-mail address is found via the username parameter).
Your
server is already configured for the placement of hit counters.
A counter may be added to your page by including the
following line in your html document:
<img src="/cgi-bin/Count.cgi?ft=5|dd=C|frgb=255;255;255;&df=login_name.dat">
(replace the login_name with your server login or something similar) For additional counters (on other pages) simply add login_name1, 2, 3, etc... You can modify the look of your counter by changing the following values:
Different counter styles can be found at http://USTeam.com/cgi/library/counter/intro.htm
If ever you need to reset a counter, you can easily do it through FTP.
Seeding your counter (setting count)
If ever you wish to seed a counter (changing it's value to something other than what it currently shows - mainly used for adding a "few" more hits to the counter than it actually displayed), you can easily do it through FTP.
Adding a new counter digit can be a bit complex, but we will run through the process step-by-step. First step, is to find a counter you like (Digitmania is a great place to find counters!). The trick lies in not actually downloading the individual counters but the file they are using to display all the digits in a row (1234567890). Download the picture that is displaying all the digits (not the separate digits! the one with them ALL together in one picture). Rename this file to 'strip.gif'. When you have completed that part, then proceed.
<img src="/cgi-bin/Count.cgi?ft=5|dd=F|frgb=255;255;255;&df=login_name.dat">
Put this code in place of the normal counter code if you do not want the counter to be visible.
<img src="/cgi-bin/Count.cgi?sh=F|df=datafile.dat">
There are two ways to view your counter data.
1. FTP and download the file
2. Create a html page to view counter data file.
If you prefer to FTP to view your count.
1.FTP to your server.
2.Go to the '/usr/local/etc/Counter/data/'
directory.
3.Find the data file of the counter you wish to
view (ie. example1.dat)
4.Download the data file to your computer (make
sure you are transferring it as an ASCII file!)
5.Open the data file with a text editor and you
will see the current count.
If you prefer to view your count in an html page.
1.Create a page with the following code for the counter.
<img src="/cgi-bin/Count.cgi?ft=5|dd=C|incr=0|frgb=255;255;255;&df=datafile.dat">
With datafile.dat being the data file for your invisible counter.
2.Ftp the html file to your /www/htdocs
directory.
3.View the file in your browser.
This will not update the count for the counter.
DNS Anonymity Script (WhoIs interface)
UST's servers are pre-configured with a 'whois.cgi'
(commonly known as the DNS anonymity script or Whois interface) script in your CGI-BIN.
This script is designed to provide your visitors (or potential customers) with a way of
checking out domain name information through the InterNIC WhoIs gateway without knowing
where the domain name is hosted. This allows you to provide domain name lookups without
letting anyone (using the Whois script) know your servers are being hosted on UST's
nameservers (the Whois script filters out the nameserver information on any queried domain
name, thereby bringing SOME anonymity to the reseller). A pre-installed WhoIs interface
should be located in your '/www/htdocs/' directory as a file named 'whois.htm'. An example
of the WhoIs (DNS Anonymity) script can be found at: http://www.USTcom.net/whois.htm. This script
may prove a useful tool to resellers.
When installing your own CGI scripts, you will, most
likely, need to modify some of the script's parameters. In most scripts the parameters to
modify will be located at the top of the actual script file after any instructions or
headers (most are clearly marked and have concise instructions in the comments for
modifying the parameter, rule of thumb, though, READ THE INSTRUCTIONS before modifying a
script!)
Most CGI scripts need to know the location of files to run properly (sometimes they even need to know where they are located themselves!). Here are some common paths and tips about paths for CGI scripts:
Most times an absolute path will be asked for when the script needs to find the directory of certain files (READ THE DOCUMENTATION TO BE SURE!)
Most times an absolute path will be asked for to handle HTML directions and coding
If a path is requested and not covered in the documentation for the script, feel free to e-mail:
support@USTeam.net and we will do the best we can to help you track down the path for your script. (Be sure to READ the DOCUMENTATION FIRST!)Security is a big concern amoung web site visitors, especially when dealing with a commercial web site. UST, provides you with a secure directory on our secure server (appropriately named, www2.security-one.com). If you have not already done so, and are wanting your secure directory, please e-mail support@USTcom.net with your account name and request for Support to activate your secure directory. You will be e-mailed all necessary information for logging into and interfacing with your secure directory. The secure directory allows you to offer secure information or secure online order forms over the SSL (secure socket layer) protecting and encrypting all data transferred between the visitor and the server.
Working with your FREE Secure Server directory
After requesting activation of your secure directory, you
should receive the account information needed to FTP to your secure directory.
The secure server location is: www2.security-one.com
Your secure directory will, most likely, be named whatever
your username is (ie. USTcom).
You will be issued a login name and password to log into the
secure server via FTP, so that you can setup your files.
You can make sub-directories under your secure directory, as
well.
Unfortunately, the secure server does have some limitations.
The foremost limitation is the inability to run your CGI scripts on the secure server.
(this is for security reasons and due to the amount of server load script would take out
on the secure server with several 100-1000 customers on it, hence the no CGI policy).
We do, however, provide you with an interface to a form mail
script (fmail.pl, just like the one in your virtual server) that allows you to use online
order forms to process any secure, sensitive information a customer would not normally
give over an unsecure site (like credit card information).
Though, this may be a limitation, due to the simple nature of
the fmail script, we have found numerous customers utilizing it quite happily for their
secure online order needs. You would interface with the fmail.pl the same way you would on
your normal virtual server, except that in the thankyou reference, you would change the
URL to the secure server rather than your normal virtual server (details are provided with
the instructions for the secure server sent to you when you request the secure server
activation). The issue of security has arisen regarding the processed mail form going from
the secure site to unsecure e-mail (where all forms processed by form mail goes). To
assuade those user's fears about security, we have implemented PGP security (Pretty Good
Privacy) that will actually encrypt the e-mail as it leaves the secure server, where,
after reaching it's destination of the recipient's e-mail, it is decrypted by the
recipient's PGP (PGP, in itself, is a VERY stable and secure encryption system. For more
information, feel free to visit the Security Solutions page
(which contains information about implementing PGP on your secure directory, as well as
general PGP information and resource links to get you better acquainted with the security
PGP provides, ensuring that all your secure transaction are just that, secure (from start
to finish).
The four lines of code required to make your form work on www2.security-one.com are as follows:
<form action="/cgi-bin/fmail.pl"
method="POST">
<input type="hidden" name="recipient"
value="email address you want form sent to">
<input type="hidden" name="subject"
value="Name of Form">
<input type="hidden" name="thankurl"
value="https://www2.security-one.com:2001/home/login/thankyou.htm">
Enabling PGP encryption for your Secure directory
First, you should know what PGP is, how it works and have
a working copy on your end. If you do not, then you need to get to this point. Head to the
Security
Solutions page for more information about PGP
(where to get it and such). After you have reached the point of utilizing PGP on your own
end, you are ready to implement PGP on your secure directory. Head to the Security Solutions page to send us your public PGP key for implementation on your secure
directory (instructions can be found at that page). More details on utilizing the PGP
system will be found at the Security Solutions page.
Getting your OWN Secure Server
Need to be a bit more professional and have a secure
server in your own domain name? Need to utilize CGI scripts on a secure site (like a
shopping cart system?)? You have the option to get your own secure server installed along
with your virtual server. Getting your own secure server has it's costs, however. There
are setup fees for the secure certificate through Thawte or Verisign ($100-$300), then the
fees for setting up the secure server software and generating the secure server keys
needed to interface with the secure certificate. If you are interested in getting your own
secure server, please e-mail: support@USTeam.net for more information.
The standard file format for the internet is called MIME.
Aspects of a web site (like the HTML pages, audio files, graphics files, etc.) must comply
with the MIME standard to be viewable by most browsers. If they are not standard, then
sometimes the files need to be accessed with plug-ins (players, etc.) that make the file
MIME compliant. With the continuing growth of web technology, plug-ins and new file
formats emerge each day. Luckily, our virtual server can conform and grow with rising
standards through the use of a MIME.TYPES file which contains information on how the
server and the visitor's browser should react to that particular file.
Configuring the MIME.TYPES file for plug-in/non-standard
files support
The documentation for the plug-in or file format you are
trying to make support for should detail what you are supposed to actually add to the
MIME.TYPES file, so check there first! In the meantime, the MIME.TYPES file is located in
your '/www/conf/' directory and should be downloaded and uploaded as an ASCII file for
editting. The MIME.TYPES file details the file type, what category it falls under (some
have classifications and groupings of MIME compliancy that they can fall under), and how
to react (server side and browser side - majourity of the time, it's browser side, and the
system tells the browser to load a particular plug-in to interface with the specified file
format).
Configuring plug-in support for Progressive Network's
RealAudio/Video
Progressive Networks now supports HTTP streaming of Audio/Video via plug-ins. This reduces the need to have server-dependant software and cuts down on costs. We offer dedicated streams but recommend our customers look into this easy alternative.
To set up real audio http streaming you require two
files. The two files are the .ra and the .ram files.
The .ra is the realaudio encoded sound file that is streamed to the client.
The .ram file is the realaudio meta file for configuration.
In the html put a link to the .ram file. It should look like this.
<a href="sound.ram">Click here to listen</a>
In the .ram file should be a single link and a blank line.
It should look something like this:
****************sound.ram***********
http://209.27.232.32/sound.ra
***************end sound.ram********
If the sound file is for a virtual host you need to
include the directory of the virtual host.
You must use the IP address for this.
A special encoder is needed to create the specialized Audio/Video files for streaming. The URL for encoder information is:
http://www.real.com/products/tools/index.html
Windows, WS_FTP, Fetch, Thawte, Verisign, PGP, and any other
company references are affiliated with their respective companies and remain a copyright/trademark of said respective companies. UST,
Inc. claims no affiliation with any of the aforementioned companies nor claims any warranty or support for any products mentioned herein,
in regards to aforementioned companies.
Contact us:
sales@USTeam.net