I want my website to be accessed from only two IP addresses.
when ever the site is accessed by more than 2 IP addresses it will shoe an error.
can any body done this in php please help me
thank you
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
To restrict the number of concurrent users you need some kind of sessions stored in a database.
Then, when a new user logs in, check if there are already two sessions from different ips and in this case throw an error.
Note that you MUST make sessions expire quickly if someone is inactive so he doesn’t prevent someone else from logging in just because he did not logout.