PDA

View Full Version : Ok, my teacher wants me to make a site........



incognito
02-26-2002, 11:51 PM
She wants me to make a math site, which has log in and things like that this. I don't want want to run a server on my machine, so I got to thinking and asking around. I was thinking that I could make a Java Appler (or something, I don't know Java) which would have some user names and passwords and if you type one of these your password would be correct and you'll get in. What I was thinking is have this Applet run everytime the page is loading and have it loop until one these passwords is created and then if it's correct finish loading the page, otherwise after a few tries you would be redirected to nopassword.html......do you think this is possible?

nvoigt
02-27-2002, 12:54 AM
Though I don't know much about it, I would suggest using php. It's very similar to C. If you like, you can easily have a database in the background. There are tons of tutorials around.

www.php.net

Fordy
02-27-2002, 03:48 AM
For password varification, you would be better of with some sort of serverside programming (Your program or script sits on the server and decides what pages to make available to the browser - just like this site).

The problem you have is that many servers able to do this are not cheap......you will probably find a few freebies if you try though...

Sekti
02-27-2002, 05:18 PM
use php...
http://www.php.net
Has a tutorial there

incognito
02-27-2002, 05:39 PM
This is what I was thinking, make an applet that loads when the page is loading up and it would stop the page from loading (it would start looping) until a password is entered, if the right password is the page continues loading if the worn password is typed after about 3 tries then you would be redirected to nopassword.htm where there would be a form where people would enter their desired password and username. The passwords would be stored in the Java Applet, people would have to update the password list manually and then have to recompile (?) the code everytime. The other reason why I want to make it an applet is so people won't be able to view the passwords which would be stored in the applet. Think this would work? Could you give me a link to a Java compiler. Because I don't want to set up a server or something like that right now.

Brian
02-27-2002, 05:42 PM
People would be able to download the Java Applet and see the passwords within the applet.

incognito
02-27-2002, 05:43 PM
oh damn........you serious? Can't you disable that?

incognito
02-27-2002, 05:47 PM
How would people download this Java Applet because I tried downloading some of the Java Applets I saw online and couldn't.
I would disable right click on the page, so you couldn't just right click and download.

incognito
02-27-2002, 06:19 PM
You also have to remember some of these kids don't even know what Java is.

incognito
02-27-2002, 06:35 PM
Ok Sorry I know this is not a Java site I will try to keep the questions about Java to a mininum, but could you please give me a link to a good Java compiler download page.

Yoshi
02-27-2002, 11:16 PM
>>I would disable right click on the page, so you couldn't just right click and download.

It will not work.

If a person's smart enough to click the left one, hold, and then click on the right one (1+2=3)and then releasing the left one, he/she has got it. Besides, this thing only works for IE.

Fordy
02-28-2002, 03:40 AM
Sorry to burst your bubble, but for someone to view your applet, they have already downloaded it....and you can dissasemble java in about 10 seconds and find the password......Should you continue on this line? - It depends on the skills of the people using the site

nvoigt
02-28-2002, 04:13 AM
Server: apache, free at www.apache.org

Server side scripting language: php, free at www.php.net

Will run on Windows or Linux.

For password verification, you need serverside scripting. php, asp, aspx, jsp or something else. For serving it, you need a webserver: IIS, Apache or something else. The cheapest and well documented combination is Linux/Apache/Php. If you don't like Linux, you can run it on windows as well.

incognito
03-01-2002, 02:40 PM
Well I told her about the vulnerability of this thing and she told me that she didn't care........besides most of theses kids haven't even heard of Java.

bobish
03-01-2002, 09:12 PM
you know right clicking isn't the only way to save you could also press ctrl+s or go to file/save in your browser. at any rate don't expect to have this out by next week try learning some web design before making a web page hosting isn't to bit a problem for one thing see if you can host it on yours schools server if not there are plenty of other free web host but most of them require you to put up a banner.

incognito
03-01-2002, 11:18 PM
learning some web design before making a web page



Refer to my avatar :D

Anyways I think she already set up a web hosting service for the webpage.

CompiledMonkey
03-02-2002, 05:55 PM
Just use JSP. I hate working with Applets. ;)

Fordy
03-02-2002, 06:20 PM
Originally posted by AMDPwred
Just use JSP. I hate working with Applets. ;)

He cant unless he has Tomcat, JRun or another suitable Servlet Application Server on his webserver.........

Might have to stick with applets afterall......they are not difficult to use though

CompiledMonkey
03-02-2002, 06:30 PM
Originally posted by Fordy
He cant unless he has Tomcat, JRun or another suitable Servlet Application Server on his webserver.........

Might have to stick with applets afterall......they are not difficult to use though

Yeah, but Tomcat doesn't take much to setup. Just deploy apache as the WS and install Tomcat to run as your AS. It's worth a little extra work. Then you could use HTML to create a simple interface and have java behind it to compute the values and such. The actual creation would be much easier in JSP than an Applet. Also, applets run slow as hell. JSPs wouldn't suffer the same problems. If you need any help or have questions, feel free to ask. I've been doing alot with JSP/Servlets in the past month. ;)

Betazep
03-02-2002, 06:31 PM
I saw someone use javascript to make an interesting password required site a while back on this board.

They named an HTML file something.html (like mghks.html) and used javascript to take user input in numbers (i.e. 1367) and convert it into the appropriate html reference.

If you did a similar things you could have 26 letters, 10 numbers, and several characters in your available pool and it could be any unknown length. (depending on how long the html name was which can be scrambled like fgh_7y87f.html so it is hard to guess)

The good thing is that you do not need ssi or anything special.

Here is the link on this board...

http://www.cprogramming.com/cboard/showthread.php?s=&threadid=1791&highlight=pass

perhaps you might want to use something similar.

CompiledMonkey
03-02-2002, 06:34 PM
Two more things, you could encrypt the passwords also for added security. Also, you could have the applet/jsp read to a file for passwords and such stored somewhere on a server (I know you can in JSP, not sure about an applet). I know you don't want to run a server, but if you want to do this correctly, and safely, you'll need to setup an application server and run some JSPs.

Fordy
03-02-2002, 06:45 PM
>>Yeah, but Tomcat doesn't take much to setup.

Well I have done a setup with both JRun and Tomcat and I wouldnt say they were easy......

>> Also, applets run slow as hell. JSPs wouldn't suffer the same problems.

That depends on the server....My pet site runs off Tomcat....and that's fine once the site has been used for a few minutes....it seems the JVM needs to "Warm up" before decent use even though I dont share the JVM........The host I have is also one of the better I tried....some of them were slow as crawling.....some are fast as lightning, but they are very expensive and well beyond the need of this case in point

>>Also, you could have the applet/jsp read to a file for passwords and such stored somewhere on a server (I know you can in JSP, not sure about an applet).

An applet can read data from a database on a server but I dont know if it can read a file unless there is some process to open the file and parse the information on the server.....

CompiledMonkey
03-02-2002, 06:51 PM
>> Well I have done a setup with both JRun and Tomcat and I wouldnt say they were easy......

It isn't too bad. And it's good for experience. ;)

>> That depends on the server....My pet site runs off Tomcat....and that's fine once the site has been used for a few minutes....it seems the JVM needs to "Warm up" before decent use even though I dont share the JVM........The host I have is also one of the better I tried....some of them were slow as crawling.....some are fast as lightning, but they are very expensive and well beyond the need of this case in point

I guess. I've never really had any speed issues with JSPs. Applets however.... :mad:

>> An applet can read data from a database on a server but I dont know if it can read a file unless there is some process to open the file and parse the information on the server.....

Yeah, you could do that. But using a mySQL database would probably be the best choice. I didn't even think of that until you mentioned it.

incognito
03-02-2002, 09:20 PM
hey thanks for all the info.

bobish
03-03-2002, 10:31 PM
oh well if you hate web design then why don't you tell your teacher to find someone else or pay big