Solved

Login from one ip

Posted on 2007-11-26
3
165 Views
Last Modified: 2008-02-01
Hi all!
I've built a login system for my page, but multiple users can login to the system from different computers at the same time. I want to restrict this, any ideas?
0
Comment
Question by:leventsatriani
3 Comments
 
LVL 21

Expert Comment

by:nizsmo
ID: 20355524
You can implement it so that there is a time-out field in your database corresponding to the login, and if the user who is logged in is active, then the timeout field will get updated always, and if a new user wants to login, but the other is still active (checked against the timeout field) then the login would be declined.

Hope this helps give you some concepts on how to go about it.
0
 

Author Comment

by:leventsatriani
ID: 20355754
i don't want to check for inactivity or smt else

what i want is, if a session is opened from one computer with a username, the other login attemps should be declined, till the user closes the browser, or logouts.
0
 
LVL 36

Accepted Solution

by:
Loganathan Natarajan earned 50 total points
ID: 20356081
it could be done in best using creating a session id for each user login and identify which user logged in.... infact you can restrict based on the session expiry and etc.,
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question