I have searched this forum up and down, as well as online. I have tryed many different prebuilt scripts. And have tryed to rewrite my exhisting scripts. But here is what I cannot do but need to do.
I own and operate a large website with approximately 5-6.5 million hits a month. Mostly from large call centers and support firms. It is a free and open website, but we are changing it over to a free login site. So users need to login to access the service, now as far as mysql stuff, and loging in and loging out, user creation, management ect... Im good there. But what I cannot for the life of me figure out isssss.....
I need to have it userA from ip 1.1.1.1 can only login once at a time. So lets say if i service an ISP callcenter with 200 reps, I dont want all 200 reps loging in as userA from ip 1.1.1.1
I need those people limited to 1 username per at a time. So Users A-Z can only login their user one time per session.
The problem is most of these callcenter would have a basic login for their reps, IE Adelphialogin would be a username they would give to 300 people. I want individual logins and they cant have it logged in more than once at any given time.
Please help.
<?
session_start();
echo "<body bgcolor=#FFFFFF>";
if ($adminusername && $adminpassword)
{
// sub has just tryed to log in
database connections stuff here
if (mysql_num_rows($result) >0)
{
$valid_user = $adminusername;
session_register("valid_user");
}
}
?>
<?
if (session_is_registered("valid_user"))
{
echo "<img src='logo.gif'><br>";
echo "You are logged in as <b>$valid_user</b><br><br>";
echo "
stuff here
";
echo "<br><br>";
}
else
{
if (isset($adminusername))
{
// failed login
echo "You are not authorized for this page";
}
else
{
// havent tryed to log in yet
echo "You are not logged in";
}
// provides form for login
}
?>