|
|
|
|
![]() ![]() |
Feb 24 2005, 02:04 AM
Post
#1
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 208 Joined: 27-January 05 From: LI, New York Member No.: 3,448 |
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..."); } ?> Then save the file as index.php. After that upload the file onto your server and make your main content page 'main.php' but dont put any template graphics or things like that. Just leaave it as plain text and links, things like that. Also make all your pages end with the extenstion '.php' and you can access them by 'http://yourname.com/index.php?page=index&page=somepage' Also the pages are now secure because if you dont put anything after the '=' sign it will think you are trying to access the page directly so thats where the 'die();' message comes in and blocks anything from going into the files. |
|
|
|
Feb 24 2005, 02:34 AM
Post
#2
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 386 Joined: 10-August 04 From: United States Member No.: 761 |
actually, you must know that the page=NAMEHERE must be the same as NAMEHERE.php So actually, it's not secure!
Thats just simple PHP Navigation! |
|
|
|
Feb 24 2005, 02:58 AM
Post
#3
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 208 Joined: 27-January 05 From: LI, New York Member No.: 3,448 |
No I think you use the more simple:
CODE $Page = $_GET['id']; @include ($Page . ".php"); |
|
|
|
Feb 24 2005, 03:56 AM
Post
#4
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 386 Joined: 10-August 04 From: United States Member No.: 761 |
True, however, that isn't secure, it's just a run around. I guess it confuses the people who don't have a clue, but they wouldn't be hackers, now would they?
|
|
|
|
Feb 24 2005, 08:13 PM
Post
#5
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 208 Joined: 27-January 05 From: LI, New York Member No.: 3,448 |
Well the way to fix that problem is to make another php snippet and put it into every single page but I cant figure out what that would be. I have been trying all different things and I cant figure it out.
|
|
|
|
Feb 24 2005, 08:18 PM
Post
#6
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 386 Joined: 10-August 04 From: United States Member No.: 761 |
The HED pe site is really good. http://www.hedrocks.com You cant right click, or view the source.. I wanna get their "no view source" script! lol
|
|
|
|
Feb 24 2005, 10:03 PM
Post
#7
|
|
|
Ancient Enigma ![]() Group: [MODERATOR] Posts: 1,741 Joined: 11-July 04 From: under the stars Member No.: 76 |
QUOTE(ill @ Feb 25 2005, 04:18 AM) The HED pe site is really good. http://www.hedrocks.com You cant right click, or view the source.. I wanna get their "no view source" script! lol you might have just been misled to believe you can't view the source code. heheheü |
|
|
|
Feb 24 2005, 11:01 PM
Post
#8
|
|
|
Super Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 386 Joined: 10-August 04 From: United States Member No.: 761 |
doh, i was too lazy to scroll down, as for the no right click script, i've used it before and personally, it's really annoying! cause i like to be able to easily copy links from my website by right clicking and copy link location
you can also find it at javascriptsource.com i believe! ..as for scrolling down, they're slick.. lol |
|
|
|
![]() ![]() |
Similar Topics