The following is a simple'ish login system (using PHP and cookies), which all fits inside a single page, the only things which need configuring are the $pass variable (clearly marked within the script) and the content which you would like to restrict.
For example:
I have a script with the following content that I would like to protect.
Code: Select all
<html>
<head>
<title>Restricted Page</title>
</head>
<body>
phone number: 0793424423435<br />
address: 13 rhfeu road, roertherfh<br /><br />
personal information, not to be disclosed!
</body>
</html>[url="http://ner0.killagraphix.com/php/dev/loginexample.php"] /click.gif' class='bbc_emoticon' alt='(click)' /> [/url]
[url="http://ner0.killagraphix.com/php/dev/loginexample.phps"]source code[/url]
Password: t3st
the Script will set a cookie for 1hr after a successful login attempt, so the user can continue accessing the page without logging in again for up to an hour after the initial login.
the source file can be found [url="http://ner0.killagraphix.com/php/dev/login.phps"]HERE[/url]
