Web Hosting Talk







View Full Version : cgi, perl, php, ssi, which one?


viol
05-07-2002, 11:49 AM
Hi, I'm moving my site to a host that has a good programming support: it supports php, perl, cgi and ssi.
I know nothing about these languages so my question is:

1 - what is the difference between them?
2- Which one should I try to learn?

My knowledge of programming languages is Delphi, Visual Basic and Javascript, but not too advanced.
My guess is that php is the most modern one.

3 - Am I right?
4 - Any free good site with lots of information about these languages? :-)

5 - Also, if I wanted to have a poll in my site that could save the IP addresses of the visitors that voted in the poll, which language would be the best one?

6 - Is there any site with a ready-to-use poll like this one I want?

Sorry to ask so many questions but I'm sort of lost in this new world.

TIA

Techark
05-07-2002, 12:06 PM
worth it's salt will support PHP and Perl and offer you your own cgi-bin dir.

CGI is not a programming lang it is a server side process perl is the lang used mostly to write cgi scripts in. It is fast and portable and has been around for along time. Lots of free scripts out there also. Try doing a search on google for perl and cgi scripts it will take you days to weed thru them all. PHP is a lang written for the web, it is an off shoot of the Apache project. Both are good langs to know. Cgi scripts can be written in C, perl, java etc.

For some good tutorials on programming try webmonkey.com they have lots of info.

As long as you know VB tho you might try getting a WIN box to host on and develop ASP.

Monte Roberts

carolinahosting
05-07-2002, 12:25 PM
You can find some good free scripts and on-line docs relating to Perl at cgi-resources.com

Another good resource if your local book store. CGI in 21 days is another good start. And if you can find this book, Perl 5 Quick Referance that is the book I use a lot for quick help on some of the perl commands. Haven't learned PHP yet, but I got a book on it...

Hope this helps...

nmihosting
05-07-2002, 06:58 PM
cgi, perl, php, ssi

1 - what is the difference between them?
2- Which one should I try to learn?


CGI is not a programing language. It stands for 'Common Gateway Interface' and is a standard for interfacing external applications with web servers. While HTML documents are static, a CGI program is executed in real-time and outputs dynamic information.

Commonly CGI's are written in Perl, which is short for 'Practical Extraction and Report Language'. One of the most popular Perl CGI scripts is formmail.pl which facilitates the sending of email from an online form at your web site. But there are many, many uses for Perl scripts. Check out http://www.hotscripts.com/ for free perl scripts and tips/tutorials.

SSI - which stands for Server Side Include - is also not a scripting language. Server Side Includes are Apache directives placed in HTML pages that let you add dynamically generated content without having to serve the entire page via a CGI. SSI's are usually used for things like banner ads or page counters but can also be used in many ways including for example if you want to use the same header in every page of your web site but only want to have to edit one version of it. You can create the header in it's own file and then 'inculde' it in all the nessicary pages.



My guess is that php is the most modern one.

3 - Am I right?
4 - Any free good site with lots of information about these languages? :-)


PHP is the most 'modern' and is a powerful scripting language. If you are going to learn only one language it should be PHP. A good place to start would be http://www.php.net . You can also look at:

http://php.resourceindex.com/
http://www.phpbuilder.com/
http://www.hotscripts.com/
http://www.devshed.com/
http://www.progammersheaven.com/


FYI - Whilst it is difficult to compare Perl and PHP. I would say that one of the main differences between Perl CGI's and PHP is that all CGI's usually must be executed from within a predefined folder, usually called the cgi-bin. PHP is not restricted in this way and works in the same way as say ASP.

I hope this info was helpful
:)

viol
05-07-2002, 07:19 PM
Thank you all for the replies.
I have bookmarked all the suggestions and now it's up to me to learn something useful. There is much info in Internet about the subject. I think I'm going to start by trying to learn php, since it seems to be very common, maybe easier for the beginner and surely it must have all the features I should need (and a lot more). Thank you again.

nmihosting
05-07-2002, 07:39 PM
Originally posted by viol
Thank you all for the replies.
I have bookmarked all the suggestions and now it's up to me to learn something useful. There is much info in Internet about the subject. I think I'm going to start by trying to learn php, since it seems to be very common, maybe easier for the beginner and surely it must have all the features I should need (and a lot more). Thank you again.

No problem :) . Good luck with PHP.