-1

I need to prevent my users to log in with two accounts at the same time with one PC , i tried to shoot out users with the same IP addresses but it will not allow to the users that they logging in from one router with different PCs, because they have equal IP addresses. In other word i want to know if some guys with equal IPs using one device or different devices.

Amin Gholibeigian
  • 1,325
  • 2
  • 9
  • 11

2 Answers2

0

In your case, using both MAC address and IP address should satisfy your request.

MAC Address can used to classify clients within a local network.

So it can classify client share the same IP address by a router.

But get the MAC adddress of client may not possible by using PHP.

Here is some reference and a case using Java Applet. I hope it can help you.

GET the Mac Address

Community
  • 1
  • 1
L.C. Echo Chan
  • 586
  • 12
  • 29
-2
 `if($_SESSION['userid']=='')

{ $_SESSION['userid']=strtotime("now"); }`

Ravi Kant
  • 289
  • 4
  • 10