umm problem...with login
Posted 21 August 2006 - 05:00 PM
but recently ive been having a problem i use the login system for my rpg.Which contains of a battle system.But some users have decided to team up and train in one account at the same time.So they go way faster.Is there any way i can only have 1 person per account logged in at a time.I was thinking of making something like a session id.
I pick randome (phrases) containing number,letters 29 characters long each.which is stored in the users table and the other is stored in the ips table.Than i receive the one from the ip using the persons ip and compare it to the one in the users table where the username mathches and if the Two rows match it lets the person continue and if not the person cant battle.Umm thats the best i could come up with/think of.Im not sure if it will work im assuming it will.
But any1 have any other ideas.?
Posted 21 August 2006 - 05:49 PM
on each login check to see if the current ipaddress is the same as the one in the database if not boot em.
You will also have to store the last time they did sent a request - so each page will have to update that. If they have been inactive for say 20 mins then allow login for that username from anywhere once more.
Posted 21 August 2006 - 06:56 PM
So when a person logs in i store their ip next to their username and what time.Each page i can include an updatetime.php so the time iwll be updated.So if they have been inactive for more than 20 mins they get logged out.And than if they have been active in the last 20 mins i only let the stored ip address come in.Sorry if im confusing.
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users