Need to restrict access to same pages on a web site

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thavaht
    New Member
    • Aug 2006
    • 12

    #1

    Need to restrict access to same pages on a web site

    I’ve been searching on the forum and don’t seem to find a post that matches my question:
    I need to restrict access to some php pages on a web site to computers on the same domain or local network, without using password.
    Can any one help with code?
  • subash
    New Member
    • Sep 2006
    • 32

    #2
    Hi,

    This can be done - But I am not sure how your code has structured and how your access level (Like Administrator, user, manager) has established.

    A simple way is create an array with the following values

    $allow=array (
    "xyz.php" => array (Admin=>"allow" ,Manager=>"deny ",User=>"deny") ,
    "abc.php" => array (Admin=>"allow" ,Manager=>"deny ",User=>"allow" )

    );

    and in your code you can check in a common place - what type of the user logged in and based on this you can restrict it.


    Subash

    Originally posted by thavaht
    I’ve been searching on the forum and don’t seem to find a post that matches my question:
    I need to restrict access to some php pages on a web site to computers on the same domain or local network, without using password.
    Can any one help with code?

    Comment

    Working...