Jump to content

using php instead of htaccess


perficut

Recommended Posts

Yeah...

 

OR!!!!!

 

PART 1

 

 

 

<?php

function session_admin(){

if(!isset($_SESSION['administrator'])){
if($_SERVER['REMOTE_ADDR']=="YOUR IP ADDRESS"){

$_SESSION['administrator']==$_SERVER['REMOTE_ADDR'];

}
}
}
?>

 

PART 2

 

<?php
function check_session(){


if(isset($_SESSION['administrator'])){


/*Show the content of this page*/

}
else
{

/*Knowing the session, or the webmaster is not online, we do not let outsiders enter this page*/
die("TSK TSK TSK, stop being so sneaky");

}
}
?>


Link to comment
Share on other sites

IF i could get rid of this annoying problem with htaccess I would consider keeping it.

 

If the wrong login ingo is entered 3 times, it directs you to my custom 'access not granted' page. Problem is, about 1/3 the page loads, then the popup returns. Hit cancel, you might get one or two more pieces of the page to load, then the popup returns.  Keeps doing this until the page completely load (maybe 100 times).

 

This redirect page is located in my root directory, not the secured directory.

 

Any ideas?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.