Jump to content
xisto Community
saga

Need To Discuss Ideas On Creating A Members Area A Discussion

Recommended Posts

Hi peeps....This is more likely a discussion not a tutorial. Its my idea of creating a members area in a website using the CGI - Perl and cookies. I am sharing this so that people out there who have more knowledge about this technique will be able to share their idead about this and they might be able to correct errors or maybe offer an alternative design or approach in solving the problem.Anyway... so here it is..the whole idea is to have some pages in the website that only members of the site can access it. To implement this I am planning to use cookies and CGI - perl.Every pages that is for members only will query or look into the cookies available for the page. The cookie will tell the broswer whether to display the member page or redirect to another url.But of course before this happens there must be a page with a form where user will type there member name and password. Then whatever the user typed is sent to a cgi program that test whether the password and user name is valid. If it is valid then it will send a cookie (like for example access=member) to the browser, if it is not then it would tell the user that he/she may have typed the wrong password or user name or something like that.So here is my question to those who are expert on this thing.. does this kind of design works for me?Although the site will contain members area page only but there is no very important data into it. It is a site for online gaming where members are the guild members. So I realy dont need serious security. I believe hackers out there can hack the site. But I think they have a little or no interest at all to the site for its content are not valuable to them.Implenting this is not hard for me since i have suffecient knowledge in Perl and CGI and also in Javascript.I hope to those experts out there will share some of their ideas about this approach and they might be able to give an alternative way in creating a members area pages in a website.Thank You.

Edited by microscopic^earthling (see edit history)

Share this post


Link to post
Share on other sites

Hmm, do you know PHP?

<{POST_SNAPBACK}>


honestly dont know anything about PHP although my friends said its good but i havent find a time yet to learn the language or should I say script. The only reason I use CGI becuase its the only think I know on how to process forms.

Should I then learn PHP?

Share this post


Link to post
Share on other sites

Wow, basically my qusetion from three years ago. When I was at tripod.com for hosting (which in no way compares to Xisto), they only allowed cgi to be done via perl, and that was the only cgi they would allow. PHP scripts were also not allowed. As to your question, yes, this method works exceptionally well. Using cookies ha the added benefit that users may not have to resign in every time they want to access the page. Another way, and I'm not going to sya either is better, is to use php sessions, which I believe are more temporary than cookies. PHP also has cookie capability, but I think your method lends itself well to perl, and you shouldn't learn php just for that, although php is an excellent language.A word of advice: don't use the cgi.pm module to set and check cookies. It is overly clunky and cookies are easy enough to deal with anyway. If you have any cookie questions in perl, I can answer them easily, and I even have a login perl page that I can let you look at.~Viz

Share this post


Link to post
Share on other sites

I think you should seriously look into learning PHP. Not only is it pretty easy to learn, in my own opinion, I think it's more functional and versatile than CGI. Not to mention the fact that PHP and MySQL are a great couple (and when you're making a members area, those databases are a dream... most of this time) I'm actually in the process of making an advanced My Space-like members area myself, and I couldn't imagine doing it in CGI but I could see how it would work for you, given the simplicity of what you're going after. Anywhos, I'm not the brightest bulb on the Christmas tree, but I think you should check out PHP.Best of Luck!

Share this post


Link to post
Share on other sites

Sorry, haven't checked the forum for a few days... I know PHP, but not Perl, so I don't know if cgi's enough. vizskywalker would know your situation more than me, since he knows cgi. PHP has enough functions for me to use in a members system.

Share this post


Link to post
Share on other sites

Both PHP and CGI (when done in perl) have enough functionality for a simple members page where the members data is kept in a .txt style file. If you want to use a database such as MySQL, then it becomes a lot easier to use PHP, however, for some other databases, it is still just as easy in perl. Whic you use is entirely up to you, I've done both.~Viz

Share this post


Link to post
Share on other sites

PHP frankly has become the preferred method of dealing with the type of site you are thinking about making. Sessions are also a better idea than cookies. The exact technical reasons I think really have to do with the perception that cookies are "evil" due to some of their uses in tracking users. If your going to be using MySQL, the PHP is the best option. If you are going to be dealing with text-based system, PERL is the way to go. Recently I've gone back to perl for a project. Sad thing is I used to know PERL extremely well when it was really the only way of creating dynamic sites on the web back in 1995/1996. Installed a number of simple PERL shopping carts back in the days when I used to do more web programming. The main reason why I am using PERL is because the form is on a webserver hosted by our ISP and it needs to pass back information to a server on our internal network. PERL is executed server side so that makes the most sense.

Share this post


Link to post
Share on other sites

Thanks guys. I just bought a book about PHP and I bought a cd too full of online books about webdeveloping and some other programming stuffs. Actualy I am starting my design already and I have decided to use PHP after 3 days of reading the whole book :D PHP is not security risk unlike CGI-PERL which could wreck havoc on the server machine. And besides PHP has a wonderful support on MySQL. I hate creating my own database :D too much work, accessing files, retrieving and parsing data.Anyway, thanks guys. By the way I prefer the session method in PHP in creating a members area since it can work even if cookies are off in the client browser. Afteri finnished my site, I need you guys to evaluate my work :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.