Hello norie-ga,
There are a number of options open to you, not all of which require
CGI,
setting up a chat can range from the very simple to the very complex.
I shall first of all try to give you a brief overview of CGI, and the
alternatives. I shall then add to this answer, step-by-step examples,
using examples you may download from the internet for free.
CGI is shorthand for the Common Gateway Interface, which is briefly a
specification which sets out how applications running on a client
computer (say, your chat room running in someone's browser on their
computer), should 'talk to' applications running on the server
computer (say, chatroom software you have placed on your ISP's
computer via your method of uploading files, like you would any normal
web document).
CGI means that, for instance, you could put an HTML form on one of
your webpages, and arrange it so that when a user entered some data
and clicked the 'submit' button, it would send that data using a
method approved by the CGI specification, to whatever program you
specified on the server.
That 'data receiving' program has to be able to do the following
things:
1. It must understand the CGI specification, so it can 'read' the
data.
2. It must be set up on the server in such a way as to allow it to
run.
1. Usually means using a programming language such as C++ or Perl.
2. Usually means your program must be placed in a special folder
on your ISP, called /CGI-BIN/, and it's permissions set
appropriately.
Assuming everything is set up correctly, the user enters some data
into the form on your web page. They click 'submit', and the data gets
sent across the internet to your CGI conforming program. Your CGI
program then does whatever is required with the data, using the
processing resources on the ISP's server, not the web users' computer.
Examples might be a guestbook - where the data is formatted, checked
for obscenity or malicious code, then entered into an existing
'guestbook' file on the server, or a guestbook, where the data is
'echoed' back out of the server, to all the other client computers who
are connected at that time.
If you want to go ahead & use CGI, here are the basic steps:
1. Ensure that earthlink.net will allow you to run CGI programs.
(is there a CGI-BIN folder in your account?)
You may find that you need to find a separate ISP, just for your
chatroom.
Note also that not all ISP that allow user CGI scripts to be run,
allow chat
scripts, as they sometimes place quite a burden on the server.
Once you have found a suitable webhost, and installed the CGI chat
software
of your choice, you may link to your chatroom from your regular
pages.
2. Write and install your chat software. Not to everyone's taste, as
it can be
laborious, time consuming & requires that you can program using
say, perl
or C. Fortunately there is an alternative - you may download and
use one of
the many free- or trial-ware scripts available on the web for
download.
These scripts can be copied into your CGI-BIN folder, with the
corresponding 'chatroom' code, often a mixture of HTML and
Javascript,
being inserted in your webpage html as you require it.
You ensure that the chat script in your CGI-BIN has it's permission
to run
set correctly - usually by issuing a 'CHMOD 755' command via ftp.
But you don't have to use CGI - it can be much, much simpler than
that. Most browsers today support a language known as Java - this
means, small programs known as 'Java applets' may be used in your
webpages; once loaded into the users' browser, they begin to work
their magic. They are quite easy to install.
A number of Java chat applets are available, for free download, on the
web.
A disadvantage of Java chat is that it only gives users the control
the original programmer included, also, it is true that not *everyone*
has Java support enabled in their browser - it can be turned off, but
is generally switched on by default.
A third method, somewhere between the Java and CGI methods, would be
by joining what is known as an IRC (internet relay chat) channel. This
would require users to install IRC client software on their computers.
This method allows the most control over the chat session.
If you want ease of use and simplicity, I would definately recommend
the Java method, although, undoubtedly there are others who would
disagree ;-)
I realise that this has been a very general answer thus far - I hope I
have given you a basic overview of the options so far, it is a topic
of as much complexity as you require it to be! I will be very happy to
expand further on any point wether listed or not, above.
I shall also add here, presently, step-by-step instructions for
setting up a chatroom on your site using Java, using the answer
clarification feature.
hope this sofar helps,
gan. |
Clarification of Answer by
gan-ga
on
31 Oct 2002 10:17 PST
Step-by-step instructions for installing Java chat technology on your
site.
1.
Visit ParaChat:
http://www.parachat.com/
2.
Click the link "Free ParaChat Rooms" - third box along.
This will take you to the page:
http://www.parachat.com/free/index.html
3.
In the section marked 'Overview', click the link "Click here to get
yours now!"
This will take you to the page:
http://www.parachat.com/free/joinin.html
4.
You may now choose from three options.
The first will allow chatroom users to click a button, which will open
a new
window on their screen, with the chatroom inside it.
The second will provide you with some HTML code, which you may
integrate into any of your existing pages. This will allow you some
control over how the chatroom ends up looking, by allowing you to
'tweak' the code yourself.
The third will allow greater administrative control, but is not a free
option.
I will continue with option two..
5. Click the link 'Free HTML' (the center option)
6. Read the licence agreement in its entirety.
7. In the section "Create Your Free ParaChat HTML Room", proceed as
follows:
Leave the width and height at their default settings, they will be
fine for most purposes.
In the box entitled 'Room Name', change the words "Your_Room_Name" to
whatever you want your chatroom to be called. For instance, NorieChat.
Make a note of your room name.
Set your language in the box provided.
Select the background and foreground colors using the drop down lists.
8. Click on "I ACCEPT - SHOW ME MY CODE"
A window will open. It will show you the HTML code you will use later,
inside your existing or new web page anywhere between the <body> and
</body> tags.
At this point, you will be able to see an example of your chatroom. If
you don't like the colours you have selected, you may close the window
containing the code and example (top right-hand corner of the new
window, cross symbol.)
Change your settings, and click on "I ACCEPT - SHOW ME MY CODE" once
again, to update your code. Repeat until happy with the look.
Once you are happy with the look, use copy & paste to save the code to
a text document (e.g. a new notepad document)
9. If you want the room to be private, do not click the link
"Add your room to our free room directory listing"
10. Click the link "Next Steps to creating your new ParaChat Room"
11. The rest of the process consists of various set-up options you may
wish to accept or decline. You have already created your chatroom at
this point.
12. Insert the code you saved at step 8, in its entirety, into your
webpage, using copy-paste. You may use HTML formatting tags, such as
<table>, to fine-tune the position.
13. That's it - you're up and running.
I hope this helps - if you would like any further clarification,
please do not hesitate to ask before rating.
gan
|