/ CGI Scripting

Worldindia.com CGI Scripting India

We have installed the Muquit graphical counter for our servers.

Add this tag to use it on your site:

<IMG SRC="http://www.yourdomain.com/cgi-bin/Count.cgi?df=yourdomainXX.dat" >

Where yourdomainXX.dat is your domain name with 2 digits.

For example, if your domain is somedom.com, you could use df=somedom01.dat. If you need more counters (for other pages), use a different number suffix (like somedom02.dat).

For all the details and features of this great little counter go to the Counter Documentation Pages.

To have the counter tag automatically generated, visit User Services. There you can choose different borders and digit display styles.

The following configurations can be done by a technician for a cost of US$50 each (they are free if you configure them yourself):
Java Chat (UNIX servers only)
Instructions:
» Telnet to your account
» cd HTML (For help with UNIX commands)
» mkdir chat
» cd chat
» cp -rv /w/chattemplate/* ~/HTML/chat
» Load your web browser, and read the installation instructions at http:///www.your-domain.com/chat/install.html
E-mail/Order form (UNIX servers only)
Setup Instructions
My CGI script doesn't work? (Binary, ASCII & Permissions) Most problems with CGI scripts (assuming they are written correctly) can be solved by running the Fix CGI program in the File Manager in User Services. You can use this method or the ones mentioned below to fix most problems
Here are some common problems encountered with CGI scripts:
1. Your script was uploaded in BINARY mode instead of ASCII mode. Re-upload the file in ASCII transfer mode in your FTP program. This means the script must actually upload as a 'text' file. If your FTP program automatically puts a ".txt" notation at the end of the script, then simply delete the ".txt" from the file name after you upload it to the server.
2. The directory your CGI or Perl script lives in is not set to the proper permission. You do not have the directory permissions set to 755.
( chmod 755 cgi )
3. CGI's must have permissions of "755" or they will not execute.
( chmod 755 *.cgi )

Forms are blank fields (input boxes, check boxes, radio buttons) on a page which allow browsers to make their selections. To process such selections, it needs to be submitted and parsed by programs on the server. CGI stands for Common Gateway Interface. It is a set of rules (protocols) which sets the basic definitions of how a program should parse these submitted forms.

Our servers have the capability to run CGI scripts based on Perl, Unix SH, KSH, CSH, and C/C++ languages. Perl is our language of choice as it is a world standard and is well suited to CGI. In addition, Perl code does not require manual compilations whereas C/C++ code must be compiled on our web servers prior to use.
If you have a custom CGI script that you need to use, simply upload it to your personal cgi directory. Here are some helpful tips to follow when installing Perl scripts:
1) Upload to your cgi directory and ensure proper file permission settings
2) Upload in ASCII transfer mode (NOT BINARY mode)
3) The first line of each script must read:
#!/usr/bin/perl
Reference the script using /cgi (NOT /cgi-bin)
If a script calls another file within your account, but the script does NOT require a URL, you need to use the system path.
/home//HTML/... <- if the file is in your website root directory
/home//HTML/cgi/... <- if the file is in your cgi directory
Substitute the path to the file beginning with your userid. Your userid is the directory name of your account

Our servers have the capability to run CGI scripts based on Perl, Unix SH, KSH, CSH, and C/C++ languages. Perl is our language of choice as it is a world standard and is well suited to CGI. In addition, Perl code does not require manual compilations whereas C/C++ code must be compiled on our web servers prior to use.
If you have a custom CGI script that you need to use, simply upload it to your personal cgi directory. Here are some helpful tips to follow when installing Perl scripts:
1) Upload to your cgi directory and ensure proper file permission settings
2) Upload in ASCII transfer mode (NOT BINARY mode)
3) The first line of each script must read:
#!/usr/bin/perl
Reference the script using /cgi (NOT /cgi-bin)
If a script calls another file within your account, but the script does NOT require a URL, you need to use the system path.
/home//HTML/... <- if the file is in your website root directory
/home//HTML/cgi/... <- if the file is in your cgi directory
Substitute the path to the file beginning with your userid. Your userid is the directory name of your account.

Place your CGI scripts (or programs) in your HTML/cgi/ directory. The scripts must have the .cgi extension. We can allow scripts to run in alternate locations. Please contact worldindia Support for any special requests. For example, if you had placed a cgi script called surprise.cgi in the directory HTML/cgi/, you access it via: http://www.your_domain.com/cgi/surprise.cgi

You can generate a simple form by logging in to userservices.your-domain.com and clicking on the feedback form wizard. First you should set up any aliases (e-mail addresses you wish to have the form mailed to) by entering an e-mail address and your ftp password. Now enter your ftp password and click on the generate configuration instructions button. This will generate html code that you can copy and paste into your page (and customize it if you like).
If you already have an e-mail form, you could use our mailer, which the feedback form uses. To access it, you need at least these lines in the tag of your .html file.
<FORM ACTION="/cgi-yourdomain/formmail.cgi METHOD="GET">
<input type="hidden" value="youremailaddress">
Name: <INPUT NAME="from-name" SIZE=30>
E-mail: <INPUT NAME="from-email" SIZE=30>
Subject: <INPUT NAME="subject" SIZE=30>
<B>Message</B>
<TEXTAREA NAME="message" ROWS=10 COLS=50>
</TEXTAREA>
<INPUT TYPE="submit" VALUE="Send Form">
<INPUT TYPE="reset" VALUE="Reset Form">
</FORM>
Probably the easiest way to build your own e-mail form is to copy and paste the tags above, then add any other information you need from the form.
It's not essential that the tags be visible to the person browsing your site. If you don't want a particular field to be visible to the browser, but want it to be mailed to you with the rest of the form information, use the TYPE=HIDDEN tag modifier.
The mail.vws script will take the NAME="from-name" and NAME="from-email" input and add them to the e-mail headers, thus you need to call the Name: and E-mail: fields as "from-name" and "from-email" respectively.
Eg.support:support@worldindia.com
sales:sales@worldindia.com
Additional Options:
1. NAME="next-url"
- when the form is submitted, this tag will direct browsers to the URL (webpage) specified instead of the default (somewhat ugly) Message Sent page.
Eg: <INPUT TYPE=HIDDEN NAME="next-url" VALUE="http://yourdomain.com/thankyou.html">
2. NAME="previous-url" - adding this tag will generate a link to the specified URL on the Message Sent page. While this can really point anywhere, it's usually pointed at the previous page.
Eg: <INPUT TYPE=HIDDEN NAME="previous-url" VALUE="http://yourdomain.com/somefile.html">
3. NAME="ignore:values" - adding "ignore:" to a tagname prevents that INPUT from being printed out or sent with the e-mail.
Eg: To prevent the "subject" from being printed out:
<INPUT TYPE=TEXT NAME="ignore:subject">
4. NAME="require:values" - adding "require:" to a tagname will make filling that field required. An error message message will be returned to the browser if the field isn't entered. This is particularly useful for ensuring you get the e-mail address of a form poster.
Eg. To accept a form only when the e-mail address has been filled:
E-mail: <INPUT TYPE=TEXT NAME="require:from-email"> You can combine "require:" and "ignore:", eg.

The counter and other "WebBots" will only start working when your Web Site is on the Web Server. You can then see them by viewing your FrontPage Web Site (eg, your-domain.com) with a browser (Netscape Navigator, Microsoft Internet Explorer, etc.)

ASK FOR FREE

QUOTE / CONSULTATION
Reload Reload