在function login裡面
加入$p_ip=get_ip();
然後
$check_time=$DB_site->query_first("select p_online_time from wog_player where p_bbsid=".$bbs_id." and p_online_time > $datecut and p_id<>".$p[p_id]."");
改成
$check_time=$DB_site->query_first("select p_online_time from wog_player where p_ip=".$p_ip." and p_online_time > $datecut and p_id<>".$p[p_id]."");
這樣就可以抓到同IP是否上線
然後
if($check_time)
{
alertWindowMsg("相同IP禁止登入");
}else
{
$DB_site->query("update wog_player set p_bbsid=".$bbs_id.",p_ip='".$p_ip."' where p_id=".$p[p_id]."");
}
[/quote]