hi
I want to set an authentication in two different computers if the master is logedin then the slave authentication can login else the slave authentication on the other computer in a network can not enter to the authentication page.
I can not use database to store the authentication as flags
and if i used sessions the other computer don't know the session(in one computer it work but in two different computers it don't )
How can I do that? any suggestion.

If you dont want to use database then you can use one simple txt file for lock and unlock.
If master login add text in txt file as 'ON'. Make it 'OFF' when logout.
If slave login then read txt file, if it is 'ON' then only slave can login.

Member Avatar for diafol

This works as long as the master logs out.

It may be useful to have a backup, e.g. check last file modification time, so you get autologoff after a set amount of time.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.