is cgi usefull for anything
by Ace · in General Discussion · 12/11/2002 (7:04 am) · 12 replies
other then a forum? i have a cgi account with gamespy and was wondering what else i could use it for.
dynamic4.gamespy.com/~noescape/cgi/forum.cgi
dynamic4.gamespy.com/~noescape/cgi/forum.cgi
About the author
Ace Owner of NoESCape.sytes.net starting from the beginning on 3d torque
#2
In your case, CGI probably means Perl.
Practical Extraction and Retrieval Language can be used to create any kind of web based application.
12/11/2002 (10:54 am)
CGI is just a way of communicating with a webserver.In your case, CGI probably means Perl.
Practical Extraction and Retrieval Language can be used to create any kind of web based application.
#3
CGI stands for Common Gateway Interface. It also stands for Computer Generated Imagery, so you'll see artists talking about it, but that sort of CGI is completely different.
hoohoo.ncsa.uiuc.edu/cgi/overview.html has a bit of an introduction to what CGI is. Basically, CGI is a standard for letting you hook up programs to the web. You could do forums, or games (www.neopets.com, [url]http://www.promisance.org/[url]), or any manner of things. Yahoo! ([url]http://www.yahoo.com[url]) does just about everything with CGI that you can do, via My Yahoo. They've got games and chat and stocks and webmail and lots of other things.
Lately, CGI has expanded to mean not only programs specifically written to communicate with a web server, as that introduction I linked you to implies, but also scripts written in languges like PHP (www.php.net) or ASP. PHP and ASP are designed to take a lot of the drudge work out of writing CGI scripts.
Most web hosting providers will give you PHP or Perl scripting. Some will give you ASP. Usually it's an either-or choice, because ASP is a Microsoft (and therefore Windows) technology, whereas PHP and Perl were written for Unix, but in reality, you can get PHP and Perl to run on Windows, and ASP to run on Unix, so you'll see crossover, too.
One incredibly useful thing to use with PHP or ASP is a database. Databases are great for lots of reasons, mostly because they save you a lot of development time in writing/loading files to disk and dealing with your data. PHP/ASP are almost never used without a database.
The database most often used with PHP is MySQL; generally, you don't want one without the other, though a lot of hosting companies will charge you an extra $5/month for MySQL. Avoid those companies ;).
An excellent, cheap hosting company if you want to do PHP/MySQL is [url]http://www.phpwebhosting.com/[url]. They're really cheap, and they give you a lot of features (subdomains, mailing lists, POP accounts, unlimited bandwidth/disk space...). The only downside is that support is e-mail only. If you know what you're doing, then that's fine. If you'll need a lot of help getting started, you should look elsewhere.
Anyway, I hope that explains things... Feel free to ask me (bgarneyATmbutiDOTorg) if you have any more questions, or just post here on the forums.
12/11/2002 (11:05 am)
For example, this site uses "CGI".CGI stands for Common Gateway Interface. It also stands for Computer Generated Imagery, so you'll see artists talking about it, but that sort of CGI is completely different.
hoohoo.ncsa.uiuc.edu/cgi/overview.html has a bit of an introduction to what CGI is. Basically, CGI is a standard for letting you hook up programs to the web. You could do forums, or games (www.neopets.com, [url]http://www.promisance.org/[url]), or any manner of things. Yahoo! ([url]http://www.yahoo.com[url]) does just about everything with CGI that you can do, via My Yahoo. They've got games and chat and stocks and webmail and lots of other things.
Lately, CGI has expanded to mean not only programs specifically written to communicate with a web server, as that introduction I linked you to implies, but also scripts written in languges like PHP (www.php.net) or ASP. PHP and ASP are designed to take a lot of the drudge work out of writing CGI scripts.
Most web hosting providers will give you PHP or Perl scripting. Some will give you ASP. Usually it's an either-or choice, because ASP is a Microsoft (and therefore Windows) technology, whereas PHP and Perl were written for Unix, but in reality, you can get PHP and Perl to run on Windows, and ASP to run on Unix, so you'll see crossover, too.
One incredibly useful thing to use with PHP or ASP is a database. Databases are great for lots of reasons, mostly because they save you a lot of development time in writing/loading files to disk and dealing with your data. PHP/ASP are almost never used without a database.
The database most often used with PHP is MySQL; generally, you don't want one without the other, though a lot of hosting companies will charge you an extra $5/month for MySQL. Avoid those companies ;).
An excellent, cheap hosting company if you want to do PHP/MySQL is [url]http://www.phpwebhosting.com/[url]. They're really cheap, and they give you a lot of features (subdomains, mailing lists, POP accounts, unlimited bandwidth/disk space...). The only downside is that support is e-mail only. If you know what you're doing, then that's fine. If you'll need a lot of help getting started, you should look elsewhere.
Anyway, I hope that explains things... Feel free to ask me (bgarneyATmbutiDOTorg) if you have any more questions, or just post here on the forums.
#4
Using CGI means every time a script loads, a new process is created on the server, which is very inefficient.
CGI is USUALLY perl or C++.
12/11/2002 (11:07 am)
Actually, in most cases, PHP and ASP do not run using CGI.Using CGI means every time a script loads, a new process is created on the server, which is very inefficient.
CGI is USUALLY perl or C++.
#5
Personally I prefer ASP .NET, microsoft or not, it runs damn fine and is easy to do.
12/11/2002 (11:18 am)
ASP/PHP can totally replace perl/c++..... I avoid perl/c++ as much as I can, unless the server offers me no other chance offcourse.Personally I prefer ASP .NET, microsoft or not, it runs damn fine and is easy to do.
#6
12/11/2002 (12:00 pm)
PHP is CGI. :-)
#7
Unless you don't care about performance. :)
12/11/2002 (12:04 pm)
It can use CGI, but it typically doesn't in an production enviroment.Unless you don't care about performance. :)
#8
AS a language for website creation I would definetly choose php unless you need it to be secure so that no-one can look at the code, then use compiled cgi
12/11/2002 (12:22 pm)
PHP is a script language that talks to the server THROUGH a cgi executable.AS a language for website creation I would definetly choose php unless you need it to be secure so that no-one can look at the code, then use compiled cgi
#9
www.vaxia.org is a beautiful text-RPG/community that runs exclusively on CGI (Perl). They have several hundred characters and as many players. The fantasy world is described as connected chatrooms, each representing a location. StoryHosts (aka GMs) go around running sessions everynow and then.. Its like sitting at the table in some friend's house to play paper-and-pen RPGs, just on the internet. I love that community, you may too, and it shows some of what you can do with CGI.
[/shameless plug]
12/11/2002 (12:25 pm)
[shameless plug]www.vaxia.org is a beautiful text-RPG/community that runs exclusively on CGI (Perl). They have several hundred characters and as many players. The fantasy world is described as connected chatrooms, each representing a location. StoryHosts (aka GMs) go around running sessions everynow and then.. Its like sitting at the table in some friend's house to play paper-and-pen RPGs, just on the internet. I love that community, you may too, and it shows some of what you can do with CGI.
[/shameless plug]
#10
12/11/2002 (7:36 pm)
thanks for the info, the forum code i have, kinda resembles torque script
#11
07/31/2003 (6:46 am)
Php all the way.
#12
Although I prefer Perl, you can do anything in either without worrying about platform.
When it comes down to it, its a matter of preference between any of the CGI languages. I stay away from ASP cause I dont like using Windows servers, and if I ever switch hosts, I like knowing my code is going to work on any OS.
(and PHP is easier then Perl, but Perl still has superior RegExp... which PHP proves as it has a perl regexp command that emulates it. :)
07/31/2003 (3:11 pm)
Perl or PHP and both use mySQLAlthough I prefer Perl, you can do anything in either without worrying about platform.
When it comes down to it, its a matter of preference between any of the CGI languages. I stay away from ASP cause I dont like using Windows servers, and if I ever switch hosts, I like knowing my code is going to work on any OS.
(and PHP is easier then Perl, but Perl still has superior RegExp... which PHP proves as it has a perl regexp command that emulates it. :)
Torque Owner Ryan J. Parker