PDA

View Full Version : One time password


christine_chua
10-17-2006, 07:07 AM
I really need expert's help~~ now i created my own website but one of the page I need to protect it with password and this password only can used once, meaning that today my password is abc, after user leave this page "abc" is no longer be my page's password. So, i guess i need a password generator as well. If my authorized visitor wish to login again, they must first contact me, so that i provide them a new generate password. How can i do this? Im confuse...

christine_chua
10-17-2006, 07:08 AM
and i wish to use javascript. coz im using ftp to upload, i dun thk it support PHP

davidj
10-17-2006, 07:32 AM
you cant really use Javascript for this as javascript is processed client side (Major security risk)

You have to do this using a more robust method like PHP.

First i would surrender to PHP and get that setup then you can start thinking about how to achieve your goal

christine_chua
10-17-2006, 08:42 AM
ooo.. meaning that i hav no choice but using php?

davidj
10-17-2006, 08:56 AM
If your serious about security then using JS is a big NO WAY

You can get into all sorts of probs with security for example if your writing something for a client and its compromised then make sure your liability insurance is paid up to date !!

There are a thousand ways to impliment security and PHP is one of them

With what you intend to do you are going to need a scripting language anyway so go for PHP

christine_chua
10-17-2006, 09:19 AM
oh ok, PHP. but i still not sure how to do it. or there's any tutorial u can teach me about it?

davidj
10-17-2006, 09:51 AM
you first need to install the software on your local machine which consists of

an operating system windows XP or apple equiv
apache web server
MYSQL database
PHP

this is known as WAMP (windows, Apache, MYSQL, PHP)

you can get installers which drop all these on at once or you can get them all individually from their own web sites

Try here first
http://www.wampserver.com/en/

once you have this installed then come back and we will move to the next stage.

NOTE: This is a programming language which you will have to learn. This takes time but the more time you invest the more you will get back.

christine_chua
10-18-2006, 01:38 AM
just to be sure, i upload my website using FTP also can use PHP for the page? meaning that is also work using PHP although im not using private server to upload website rite?

chriskq
10-18-2006, 04:18 AM
yes yes.... i think you dont understand that PHP is basically a different version of html...... so instead of naming ur page index.html it now becomes index.php.... ftping has got nothing to do with using php (but you must find out if ur web hoster allows php - otherwise you will have to use pearl, cgi or .net if u can afford (willing) to pay microsoft.)

davidj
10-18-2006, 07:47 AM
there is a little bit more to it

as chris rightly said that you need a host package that supports PHP so thats your first step. Find out. If your current host product does not handle PHP then you will have to add this.

PHP has nothing to do with HTML.

You normaly name your pages with an .htm extension but when using PHP you use a .php extension. This tells the server that there is some php code to process before the html is output.