The quickest way to get a password protection system up and running is to use a Prompt box in JavaScript that has a title like "Enter your Email Address". Only you and the relevant users know what the password should be, could even be one each, that can be sorted out at the next page
then pass the "input" directly through the url by changing the .href, like http://www.iSource.net.nz/users/?leTmeIn= The page that then processes this should also check for the referring page, and three fails from an IP if you like
the php (the next page):
CODE
<?php // processdownloads.php if (!isset($_POST['leTmeIn'])) { ?> <script language=JavaScript> location.href=document.referrer; </script> <?php } else { ?> put all your download stuff here <?php } ?>
<script language=JavaScript> function doOpen(){ pw = prompt('Enter your Email Address',''); if (pw){ location.href='processdownloads.php?'+pw+'=' return(false); } }else{ return(false); } </script>
This is a cheats way of dealing with hackers, crackers or anyone else who shouldn't be where you dont want them to be. leTmeIn is the password here
This is quick and simple, but leaves an ugly url and therefore would not be ideal for anywhere that someone could look over your shoulder, or go through you history, but can be hidden in frames
a simple PHP only version would be:
CODE
<?php if (!isset($_POST['submit'])) { ?> <form action="" method="post"><input type="password" name="email"> <input type="submit" name="submit" value="Submit"></form> <?php } else { $pass = $_POST['email']; if ($pass!="leTmeIn") { ?> <script language=JavaScript>location.href=document.referrer;</script> <?php }else { ?> put the rest of the page here <?php } } ?>
the javascript (the first page): CODE <a href="" onclick="return(doOpen());" >downloads</a>
<script language=JavaScript> function doOpen(){ pw = prompt('Enter your Email Address',''); if (pw){ location.href='processdownloads.php?'+pw+'=' return(false); } }else{ return(false); } </script>
ya this is not a secure way of stopping hackers, crackers, etc. go to any legal hack site, like hackthissite.org for example and the number one noob test for hackers would be something like what you just posted. all someone has to do is view the source code and they would get the password.
It is indeed a good method for beginners (like me). And I would also like to say that your first post was very good as well.
But if you ask me, I would say that using a simple MySql database along with php or asp would do the work and offer more security. In this way viewing the source to find the password will also be in vain.
May not be the most secure, like you said, but it's still pretty nifty! Especially if you're in a bind and need something quick and simple to work with. Thanks
Creating password submit forms through Javascript is an extermely low-security method of keeping documents private, and should not be used for anything TOO important. The reason for this is that JavaScript code can be seen in the source of the page, which can give away the password, and even if you put the code as a seperate .js file and jst embed it into the actual login page, the source will still reveal where this .js file is.
The easiest way to make a basic password protection script, is just to create a HTML page with two fields (username and password) that refers to a .js file (this makes it so that you cant find the passwords in the source code) then use a javascript script file with arrays (one for usernames, one for passwords) then a part saying goto a URL "if document.username.value == username[1] && document.password.value == password[1]" using a line like that for each set of usernames and passwords.
however that does not encrypt it in any way, or make it so you cant go back to it just by bookmarking it.
One way to stop people just glancing at the url. is to make the index.html page, a frameset, with one frame, that takes up the whole page, then even when you click on links, the url will always just be "www.whateveryoururlis.com" as long as you dont have any links targeted to "_top"
thats just an easier way to make a simple login without PHP
The quickest way to get a password protection system up and running is to use a Prompt box in JavaScript that has a title like "Enter your Email Address". Only you and the relevant users know what the password should be, could even be one each, that can be sorted out at the next page
then pass the "input" directly through the url by changing the .href, like http://www.iSource.net.nz/users/?leTmeIn= The page that then processes this should also check for the referring page, and three fails from an IP if you like
the php (the next page):
CODE
<?php // processdownloads.php if (!isset($_POST['leTmeIn'])) { ?> <script language=JavaScript> location.href=document.referrer; </script> <?php } else { ?> put all your download stuff here <?php } ?>
<script language=JavaScript> function doOpen(){ pw = prompt('Enter your Email Address',''); if (pw){ location.href='processdownloads.php?'+pw+'=' return(false); } }else{ return(false); } </script>
This is a cheats way of dealing with hackers, crackers or anyone else who shouldn't be where you dont want them to be. leTmeIn is the password here
This is quick and simple, but leaves an ugly url and therefore would not be ideal for anywhere that someone could look over your shoulder, or go through you history, but can be hidden in frames
a simple PHP only version would be:
CODE
<?php if (!isset($_POST['submit'])) { ?> <form action="" method="post"><input type="password" name="email"> <input type="submit" name="submit" value="Submit"></form> <?php } else { $pass = $_POST['email']; if ($pass!="leTmeIn") { ?> <script language=JavaScript>location.href=document.referrer;</script> <?php }else { ?> put the rest of the page here <?php } } ?>
I hope it helps someone.
PS: This is my first post
Hey,
That is a really great first post! Better than mine.
A Javascript login system is better than no seccurity at all.
It will mabey stop 40% off the people who want to get into your site. As I said before its better than nothing but I wouldn't rely on it!
this helped me but i need to find a way to create a reegistration form and make it send an activation e-mail, plus if they are 16 or under they must get parent/guardian permission like they do on club-nintendo.
This example will show you how use a string in VB to create PHP code. In order to do this, you need
a string to store your PHP page and a function that I will list at the bottom of the page for you to
put in a module. This code is written in VB.NET Public Sub CreatePage(ByVal HTMLTitle As
String, ByVal HTMLText As String, ByVal HTMLFileName As String) Dim strFile As String '
---------------------- ' -- Prepare String -- ' ---------------------- strFile = "" '
-------------------- ' -- Write Starter -- ' -------------------- strFile = " " ....
The Trap17 forums have a whole subforum devoted to those amongst use who have failed to remember
their passwords, and have locked themselves out of their free web hosting account. If you forget
your password, you can go to Free Web Hosting, No Ads > FREE WEB HOSTING > FREE WEB HOSTING
REQUESTS > Free Web Hosting : Password Reset and ask the friendly admins there to reset your
password for you. Remember the days when your password on the Internet could be something like
andrew18 ? And you could use that same password on all three websites that you visited....
Variables Javascript assigns every variable a type which changes as we assign different
values to the variable. We can get the type of a variable using the ' typeof ' operator.
For eg., CODE var hello = "Welcome to Trap17"; var year = 2008; alert(typeof hello );
alert(typeof year ); The above lines will output the type of the first variable 'hello'
as String and the second variable 'year' as Number . The types of Javascript variables
are Boolean, Function, Number, Object and String . A variable with no explicitly assigned v....
JavaScript is very handy at making forms, allowing for much more customization and easier ways to
send data. So making Login forms using JavaScript may seem to many to be a very feasable idea.
However, JavaScript is very bad at protecting Passwords, as since the passwords are not encypted and
the whole JavaScript code is in the page, a person could just view the Page Source and find out
everything. Even if you use an external JavaScript, it would still be poor as the file name for the
external JavaScript would still be revealed. But I have an answer! There is a relative....
Description Learn to create easy to edit content-only pages with php. By parsing your layout into
your pages, you can reduce file sizes and files will become much neater. Try it out Ok, lets
start by creating a file called template.php. CODE //---------------------------------
//Layout top section //--------------------------------- $top = INSERT CODE FOR TOP OF LAYOUT
HERE. html; //--------------------------------- //Layout bottom section
//--------------------------------- $bottom = INSERT CODE FOR BOTTOM OF LAYOUT HERE. html; ?>
Ok simpl....
Ok, I will teach you how to create a simple HTML editor that runs online with buttons that add HTML
tags. Before we start: You should have basic knowledge of these languages. HTML/XHTML
Javascript PHP You will need Ability to use filesystem functions. Chmodding abilities
Features of Editor Online PHP safe Full HTML support A Few Bad Features Can only create new
documents or overwrite Fairly unsafe Now we are ready to begin. The PHP Script This will be
our PHP script that we will use to make the file. Make a file called save.php Here is the....
This Topic will teach how can you change your without knowing your old Passward 1. Click "Start"
Then Click "Run". 2. In the dialog box type in "CMD" and select "OK". (Opens Command Prompt) Or you
can manually open CMD by navigating to "C:\WINDOWS\system32\cmd.exe". 3. Once Command Prompt is
open, type in "net user" and hit enter. This will display all user accounts. 4. Now type in the
following command: " net user (ACCOUNTNAME) * " and hit enter Example: net user Trap * (Dont
forget to add the asterisk) 5. Now it will ask for a new password, enter a password and....
It kind of amazes me that there's not even a mention of the Mootools javascript library
throughout this whole forum. So here I'll do a brief introduction and a tutorial on how to
produce the famous accordion effect. MooTools is a compact, modular, Object-Oriented javascript
framework designed to make writing extensible and compatible code easier and faster. MooTools lets
you get the job done efficiently and effectively. It is slightly based on the powerful Prototype
javascript framework , of which Scriptaculous runs on. (But frankly, I dislike Scriptaculou....
In this tutorial I will show you how to create two buttons in the bottom left of the screen that,
when hovered over, will scroll the page. Now to start with, we must create a our buttons, the first
line will create a div element, or block. Using blocks you can position items anywhere on a page.
We use the ID property just to let us know what the block is used for, as for the first block, its
obvious that it contains the vertical buttons and the second two blocks contains the horizontal
buttons. The style property of the div tag tells the browser how to draw it, in the....
Whilst searching around for help to setup cutenews blog I came across a way to use php in html pages
- lo and behold it works! so I thought I'd share it with you all (Unfortunately I can't
remember the site so I wrote this up a couple of minutes after I did it:) ). This method requires a
web server with apache installed. So, luckily for us all this covers the whole of Trap17... even
Qupis /tongue.gif" style="vertical-align:middle" emoid=":P" border="0" alt="tongue.gif" /> Just
to make the point, this is in no way a difficult task and it doesn't require yo....
like in the topic, here is a description how to change the Backgroundcolor "On The Fly", by klicking
on a button or radio-box first, we ned the html-and body-tags, create a new html-file on your
desktop and write the following: QUOTE browser interpretation: html - tag
means "hey, browser, here comes HTML" in the body-tag you define the looking of your site. you can
add things like "bgcolor" for the background, "text" for the textcolor and link / alink / hlink /
vlink to define the linkcolor ( ) the scripttag is the tag, we'll need now (sorr....
This code: CODE HTML 4.0 Strict document ... Your HTML
content here ... ... More HTML content here ... represents a minimum, acceptable
web-page according to the W3C which is the organisation that sets the standards for the World Wide
Web, or as we call it, the Internet. In another Tutorial, you can learn about the html code, but in
this Tutorial, I wish to emphasis the importance of the DTD or Document Type Declaration, the first
line in the sample code above. What it does is tells the Browser that a certain set....
first let me tell you what is setting a password in bios is the password set at bios is asked when
you start your pc even before your operating system is booted heres the steps 1.as soon as you start
your pc press 'del' or 'Esc' continiously and you'll find the bios screen
2.when you spot the bios screen go to the security section in security section there are two option
of setting password 1.admin pass - you can't del this pass in bios without knowing the
password(only for advanced users) 2.user pass - you can delete bthis password from bios ev....
Good morning everyone. Have you ever wondered how to allow your visitors to edit content on your
blog? Like adding a post straight off the page, adding a link, editing your profile etc. This will
be extremely useful if you want your visitors to contribute to your blog besides writing comments or
tagging. 1. Adding a post straight off the page. Go to blogger.com, login, select your blog. Go to
settings -> email. By enabling blog email, you can now add a post by simply sending an email to the
address you specified. The address should look something like: yourusername....
Well i ran across this script awhile back, and i am tired of storing it on my computer, so i am
going to post it here and whenever i need it i will come here and get it /biggrin.gif"
style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> hopefully Anyways, it is a
verry simple process just copy and paste this QUOTE if (($user) && ($passwort)) { # get url
$url = $DOCUMENT_ROOT . dirname($PHP_SELF) . "/.htpasswd"; # make .htaccess and .htpasswd
$htaccess_txt = "AuthType Basic" . "\n"; $htaccess_txt .= "AuthName \"protected area\"" . ....
This method works, but unfortunately compression software can open the file without the password.
Also, you can try creating a new user account. When it asks "Make files and folders private?" click
Yes, make private. Name the new user account anything using NO spaces/uppercase letters, but not
something like "privatefiles" or something like that. Try accessing the files in C:\Documents and
Settings\ >. You cannot open the folder. Now to ensure that user is always hidden in My Computer,
click Start > Run. 1. Type in command.com . This should bring up a black window t....
hi, today im going to give you small tutorial how to use `Prototype JavaScript Framework` 1st you
have to download `Prototype JavaScript Framework`library from http://prototype.conio.net/
prototype makes easy to using Javascript, ex : when you want to point (get) the element from HTML
usually we use : CODE document.getElementById('elementId') with prototype we use
CODE $('elementId') , yeah...world getting small..with prototype. example we`re going
to get value from an element of CODE with prototype we use CODE alert(....
Tool Tip Tutorial Example Found Here . Please review before continuing. Nice. And no
javascript at all to be found. The colours I have used are for demonstration purposes only to show
you that they are adjustable to suit the background or to contrast against them. Your choice. That
is a styling issue. It is your site, you decide. The original author's idea was to add
position:relative to the link, in order to allow the span element inside to position absolutely
in respect to the parent link. This code has been tested in Ie5.5, IE6, Opera7.11 and M....
I have looked all over the site and could not find anything that was like this simple, or just like
this at all.. For some people i know that you are using a basic HTML site...and having a big menu
if you want to add somthing you have to go into every one of the pages and add or remove or edit
what you want to do, but with somthing verry simple all you would have to do is edit one file, and
all of the pages that have the PHP script on them would suddenly change to what that one file is.
So to start off if you are planning on using this little tirck, the page that you a....
/tongue.gif' border='0' style='vertical-align:middle' alt='tongue.gif' /> Some common things to
implement in our webpage very frequently are as follows. How to implement all these I am going to
tell you in this tutorial. Add To Favorite Set As Homepage Go To Top Of Page No Right Click
Print Page Adding Current Date Adding Current Time Pop-Up Page Creation Closing Window
Copyright Notice Updation 01. Add To Favorite Someone may be interested in the content of your
page. Offer him/her to add the page in his/her favorite menu. To do this you have ....
In this tut i'm going to tell u how to remove the psswd expiry in windows xp * Go to Start|Run
and type Control userpasswords2 * Go to Advanced tab in the user accounts window * Again select
the Advanced button under the Advanced user management header. * Now click on the User in the Local
Users and Groups. * On the right pane you will see the list of all user account * Right click on
the user name for which you want to change the setting and select the Properties option. *
Now click in the General tab check on the password never expires option. * Clic....
**** This tutorial will show you how to put files into .rar Archive and pass worded (if wanted)
**** What You Will Need Before continuing you will need a couple of thing, first of all you
need WINRAR , which is a very powerful archive manager. It can reduce size for you email
attachments, decompress RAR, ZIP and other types of files downloaded from the internet. You can get
winrar at http://www.rarlabs.com The other thing is that make sure your using Windows XP because
this is what I used to make this tutorial. I think it works with any other windows not....
Tutorial: Image Rollovers w/ Javascript, by Rob J. Secord, B.Sc. (SystemWisdom) See a
working Sample of this Script! Download a ZIP containing all working files in this tutorial!
Note: If you are not interested in reading this entire tutorial and/or have a basic understanding of
the underlying concepts, you may safely skip to the Implementation section to get the code!
Description : A Dynamic Image Rollover Script tested to work in 4 major internet browsers: MSIE,
FireFox, Netscape and Opera. Using only Javascript combined with regular HTML Images ( ....
This tutorial is meant for people that are dealing with problems while coding their site at 100% of
width. Important notice: Some people has JavaScript disabled, so they will not be able to load CSS
file (take this in account when creating your website). How this script works. In the HEAD of your
HTML document will apply this command, so variable.js file will be load at start: CODE
In browser JavaScript file variable.js is loaded. This Javascript file consist of this parameters,
copy this code and name it variable.js CODE // JavaScript Document if (sc....
How To: Change An Image When A User Clicks On It using both php and javascript - a powerful
combination I have seen quite a few how tos offering a method of doing this but none of which
resembled my method of making use of both php and javascript. This code is fairly repetitive and
most of the functions are easy to pick-up if you haven't heard of them before. Here it is...
Create your two images. Call them anything you like, you'd just need to change their filenames
in $imgano $imgayes. In fact with this script you can easily create more than one pair....
This tutorial was requested by sxyloverboy . Introduction: sxyloverboy has asked me how
to make your navigation bar on him website change to add another page, without having to do it on
every page. Well, I have the answer for you! Beginning Assuming you have a FTP upload access,
you'll be open your file "index.php" -=Example=- Once your "index.php" file is open press
"CRTL+F" (Find) and search for something that looks like this; CODE
width="100%" height="14" valign="top"....
I've seen a tutorial on here and no offense but it was horrific, this is the real way you do a
404 Error Page. Make a file called: htaccess.txt Open it up and put this: CODE ErrorDocument
404 /myerrorpage.html You will need to change myerrorpage.html to whatever your page is called.
Also when you upload this file to your server you need to rename it to: .htaccess Yes, the dot is
before the words. You need to do this on the server because on Windows you cannot do that!....
Tutorial: Image Preloader with Progress Bar, by Rob J. Secord, B.Sc. (SystemWisdom)
Description : A Tutorial for a Client-Side Image Preloader with Dynamic Real-Time Progress Bar
Indicator written in JavaScript! Tested to work with 4 Major Internet Browsers: Firefox, MSIE,
Netscape, Opera (Complete sample solution provided at end of tutorial, just put it on your
web-server, add your images and go!) Intended Audience : Beginner to Intermediate Web
Developers. Although this tutorial will cover some advanced aspects of JavaScript, I will try to
explain it all ....
In this tutorial, I'm going to show you how to test your PHP pages without the Internet or
uploading the files to your trap17 server. This tutorial is similar to doom's, but the links he
provided does not work, so I decided to make my own tutorial with working links. The program that I
will be using for this tutorial is called XAMPP . XAMPP is a modification of the popular Apache
server, and I'm using XAMPP because of its simplicity to install as well as maintain. The
current version of XAMPP is 1.4.13 and it has the following bundled in the download: QUOT....
Looking for simple, javascript, password, system, protect, pages, password