$addtime=date("Y")."-".date("m")."-".date("d")." ".date("H").":".date("i").":".date("s");
if ($onlineif==0){
$text1="insert into online(ip,conntime) values('$REMOTE_ADDR','$addtime')";
mysql_query($text1,$conn);
} else{
$text1="update online set conntime='$addtime' where ip='$REMOTE_ADDR'";
mysql_query($text1,$conn);
} ;
$err=mysql_error();
$text2="select * from online" ;
$onliners=mysql_query($text2,$conn);
$online=mysql_num_rows($onliners);