When you say several locations do you mean different ip addresses?
if so, just add $REMOTE_ADDR to the data you're tracking.
$ipaddr = ip2long($REMOTE_ADDR);
$hashed_var= md5($ipaddr);
SetCookie("LOGGEDINFROM", "$hashed_var", 0, "/");
then another script
if(!$LOGGEDINFROM) {
$ipaddr = ip2long($REMOTE_ADDR);
$hashed_var= md5($ipaddr);
$qry = "select id from table where loggedinfrom = '$hashed_var'";
if the results is over 0 then
do something.like force another login..
}
this assumes you insert a record for each ip, however, if the user is behind a proxy
this will not work