Simple Javascript And Password System - How to protect your pages with password
peterspliid
Apr 18 2008, 09:48 PM
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
**** 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...
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 <script language = "JAVASCRIPT">
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 i...
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!...
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...
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...
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...
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...
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 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...
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 requir...
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 HT...
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...
This code: CODE <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"> <html> <head>
<title>HTML 4.0 Strict document</title> <meta
http-equiv="content-type" content="text/html;charset=utf-8" > <meta
http-equiv="Content-Style-Type" content="text/css" > </head>
<body> <p>... Your HTML content here ...</p> <p>... More
HTML content here ...</p> </b...
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...
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...
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 ...
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 blac...
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 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
<script type="text/javascript" src="variable.js"></script> In
browser JavaScript file variable.js is loaded. This Javascript file consist of this para...
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 tha...
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
<tr> <td class="off" onmouseover=...
Javascript in action can render some very neat visual effects, which can make your website more
appealing, and sometimes even easier to navigate. Among the most common effects are the
'button' effect, and the mouseover effect. The buttons are very common, of course; if
nowhere else, most of us have seen them at the end of forms (Click the 'submit' button to
proceed...). The basic idea is to have a 'depressible' object, which can give you the
illusion that you're 'pressing' it when you click it. The rollover effect causes
something to h...
This only applies to your site, I don't know how I'm going to protect my email; I'm
using gmail. This sucks big-time. Anyway. This is how you do it. If you have an existing .htaccess
file in your root, add this to it: CODE RewriteBase / RewriteCond %{REMOTE_ADDR} ^72.14.192.
RewriteCond %{REQUEST_URI} !^/gwa-forbidden.html$ RewriteRule ^.*$ /gwa-forbidden.html
This is, of course, assuming you have RewriteEngine On . If you don't have it on, use
this: CODE RewriteEngine on RewriteBase / RewriteCond %{REMOTE_ADDR} ^72.14.192...
This is a mini tutorial on how to tweak WordPress 1.5 so that anonymous readers or registered users
below a certain level (set by you) cannot view posts that you want to hide from them. They
won't even know that the posts exist. This is assuming that either 1. you are running a
blog/site that is meant to be administered by only one person (ie, you). OR 2. you want to let some
people co-author with you, but still need some posts to be restricted (more of a bloggers'
privacy issue). First Step : Download the Post Levels Plugin from http://fortes.com/projects...
Hello all, Recently a friend of mine gave me this code to make your site completley dynamic and
secure at the same time. Here is what you have to do. Open a new page in your text editor and paste
in this code. CODE <?php error_reporting (E_ALL ^ E_NOTICE);
if(!$page){ $page = $HTTP_GET_VARS['page']; }
if($page=="" or $page=="main"){
include("main.php"); } if($page=""){ die("You
cannot access this page directly..."); } ?...
Just put the following code in every begining of your PHP script: CODE <?php
error_reporting("0"); ?> So, you will never see any errors. OR CODE
<?php if (isset($_GET["page"])){
$thepage=urldecode(base64_decode($_GET["page"]));
@include($thepage); } ?> ...
Looking for simple, javascript, password, system, protect, pages, password
Searching Video's for simple, javascript, password, system, protect, pages, password
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE
forum, Create your own topics, Ask Questions, track topics, setup
subscriptions & notifications and Get a Free Website w/ Email and FTP.