Results 1 to 4 of 4

Thread: PHP Restriction

  1. #1
    Join Date
    Feb 2002
    Posts
    43

    Unanswered: PHP Restriction

    I am hoping someone can help me solve a problem I am having. I want to be able to restrict a user based on location. For example user1 logs in from home1 and gets link1, link2, and link3, but if they login from home2 then they can only use link1 and link3. Is this possible in PHP and if so how do I accomplish this.

  2. #2
    Join Date
    Feb 2004
    Posts
    533
    I think you can do this by checking the Users IP address. You will have to keep list of users and work IP addresses. If the user IP address is not in the IP list then access must be from home or elsewhere.

    The users ip address is stored in the environment variable $REMOTE_ADDR
    Last edited by savbill; 08-24-04 at 18:59.
    ~

    Bill

  3. #3
    Join Date
    Feb 2002
    Posts
    43
    That is a good idea, but I am working with IP addresses that are all dynamic. Any suggestions for that case?

  4. #4
    Join Date
    Jul 2004
    Location
    Inverurie
    Posts
    628
    could you generate a list of commonly used IP addresses and then set the access levels in there? granted it would work through an IP scan, and would slow things down, but could be possible...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •