maddog39
Feb 24 2005, 02:04 AM
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.  This will ensure that hackers cant get to things that easily. So enjoy and protect your site against evil dooers. 
Reply
ill
Feb 24 2005, 02:34 AM
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!  I use it on my site... This is the PHP version of Frames, it uses the include php function!
Reply
maddog39
Feb 24 2005, 02:58 AM
No I think you use the more simple: CODE $Page = $_GET['id']; @include ($Page . ".php");
Reply
ill
Feb 24 2005, 03:56 AM
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?
Reply
maddog39
Feb 24 2005, 08:13 PM
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.  There must be some simple solution that I just not thinking of.
Reply
ill
Feb 24 2005, 08:18 PM
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
Reply
serverph
Feb 24 2005, 10:03 PM
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.  if you're seeing blanks, you have to scroll down a bit more. as for the no-right click to view source, it's a simple javascript code from dynamicdrive. how did i know, i viewed their source code!  from your browser menu, click view, then view (page) source. heheheü
Reply
ill
Feb 24 2005, 11:01 PM
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
Reply
Similar Topics
Keywords : secure dynamic pages php- Simple Javascript And Password System
- How to protect your pages with password (7)
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 // processdo...
Create Dynamic Html/php Pages Using Simple Vb.net Code
- Taking your application data, and creating a webpage for others to vie (1)
Test Your Php Pages W/o Upload/internet
- complete *working* guide on how to test your php pages (57)
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...
How To: Make A Simple Php Site
- Making one file show up on all pages using php (21)
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...
Css And Javascript Combined For Dynamic Layout
- use of different CSS files at same site (9)
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...
Make A Moderately-secure Password System Using Javascript
- using file redirection to hide the password. (4)
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 rela...
Php--> Content-only Pages
- Create easy to edit php pages. (9)
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 <?php
//--------------------------------- //Layout top section //---------------------------------
$top = <<< html <!-- include HTML header code here --> <body>
INSERT CODE FOR [b]TOP[/b] OF LAYOUT HERE. html;
//--------------------------------- //Layout bottom sec...
Changing A Dynamic Ip
- How to change your dynamic IP. (18)
In this tutorial I will tell you how to change a dynamic IP if you have Windows XP. First of all go
to - Start >> Run - and type 'cmd'. A window with a black background and grey text. In
this window type 'ipconfig' and text should come up saying: IP Address ............. *IP
HERE* Subnet Mask ................ *SUBNET MASK HERE* Default Gateway .......... *DEFAULT GATEWAY*
Write this down on a bit of paper on in notepad. You will need them later. Now type
'ipconfig/release' - this will terminate your internet connection - but don't g...
Custom 404 Error Pages
- A Tutorial On How To Make Custom 404 Error Pages (17)
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!...
Dynamic Signature - Yet Another Way To Do It
- Create dynamic sigs for multiple users using .htaccess and RewriteRule (0)
Ever since I connected a program I made in Visual Basic to MySQL database, I had an idea to create
some sort of a status page... And I did that, where I updated my connection status every 60 seconds,
updated my Winamp playlist, and several other interesting things... Then, I figured I could create
an image, and display all that info, and show it on forums, as a signature... And I made a great
PHP script, that look real fancy, and does the job perfectly... So, I was adding the reference to
http://status.galahad.trap17.com/stat.php to all the forums... BUT (there's ...
Templating System Using Php Includes
- Building a Dynamic site using Includes and flat-files. (13)
Php based Templating System http://jlhaslip.trap17.com/template/index.php The Source Code
for the scripts are included (literally) on the different pages on the Demo, including the Contact /
Email script. The only page not there yet is the Message Script. Maybe tonight I will upload that.
This one uses a little bit of query-string checking to confirm that the contents of the page are
actually available (file_exists())and an allowed page content before serving it up. The
'allowed page content' is done by checking against a flat-file containing an array...
Do You Want To Use Php Code In Your Html Pages?
- Within two minutes you will! (9)
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...
Dynamic Signatures - The Real Way To Go
- Forget placing index.php in a signature.png folder. (8)
This is only a very quick tutorial, meant to complement the dynamic signature tutorials that already
exist here. It's nothing new, but it was just brought to my attention that not many people seem
to be aware of this method. This does not cover the actual creation of dynamic signatures, per se -
but rather a better 'trick' to allow you to use dynamic signatures on forums such as this
one. I've noticed that most of the dynamic signature tutorials on this forum state that you
must place a file index.php in a folder .png, in order to trick Invision Power...
Making A Dynamic Page On Blogspot
- Using an external server to make your pages hosted on blogspot dynamic (5)
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...
Document Type Declarations
- And why we use them in html pages (0)
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...
Php Dynamic Signatures
- Using the GD Module and MySQL (9)
PHP Dynamic Signatures using the GD Module After much scowering on the internet to find a
suitable tutorial on this subject, I came up empty-handed. So I was forced to learn it on my own
through trial & error. And since I had discovered a lack of tutorials on this subject, I dediced to
write one! Working Example: Abstract : Using the GD Module of PHP allows a
developer to build custom Images with Dynamic Content. Such content could be the Requesting Users
IP Address, Web-Browser Type, Operating System, even the number of times the user has see...
Using A Secure File Transfer Client
- A discussion of FTP, FTPS, SCP, and SFTP (0)
Using a Secure File Transfer Client Almost everyone who creates a web site is faced with
the problem of getting their files from their local computer to their web server. There are a few
different protocols (methods) through which to accomplish this, and some have definite advantages
over others. Here are the major ones, listed loosely in order of increasing security. Note: All
of the programs recommended in this tutorial are for Windows only. Command line alternatives are
accessible via the terminal for both Linux and OS X. FTP First a note on using ...
Secure The Email Addresses On Your Website!
- Wonderful script and useful! And working (10)
Just follow the instructions below: /* Secure Email Function by Juan Karlo Aquino de
Guzman Website: http://www.karlo.ph.tc and http://www.abs-cbn.ph.tc E-mail:
http://www.karlo.ph.tc/send.php Usage: showEmail("support@microsoft.com",0); OR
showEmail("support@microsoft.com",1); Types: 0 = ordinary random 1 = more secure random To
include to a script: include_once("email_secure.php"); */ And here is the code :
CODE <?php /* Secure Email Function by Juan Karlo Aquino de Guzman Website:
http://www.karlo....
How To Edit Your "index Page"
- Adding new pages? (0)
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=...
Php Installed Modules Dynamic Reference Tool
- An effective tool for coding in PHP (4)
PHP Installed Modules Dynamic Reference Tool A dynamic tool for referencing PHP modules and
their associated routines, which are installed on your web-server. **Note: Uses only 2 functions
built-in to PHPs core and should be easy to convert to a later version of PHP. This current version
uses PHP4. Example: PHP Installed Modules Dynamic Reference Tool Abstract : As a PHP
Developer, it is nice to know what functionality is available to you, and what you would have to
implement yourself. Some of this functionality is provided for you by the PHP core,...
How To Block Google Web Accelerator
- from caching your pages (6)
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...
Secure Dynamic Pages Ii
- (0)
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 secure, dynamic, pages, php
|
*RANDOM STUFF*
*SIMILAR VIDEOS*
Searching Video's for secure, dynamic, pages, php
*MORE FROM TRAP17.COM*
|
advertisement
|
|