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.
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