3 在线用户的信息扫描和更新
在网页中使用内置框架来调用扫描和更新程序,这行也能在网页源代码里面看到!
1<iframe frameborder="0" height="0" hspace="0" marginheight="0" marginwidth="0" name="flush" scrolling="NO" src="userflush.php" vspace="0" width="0"></iframe>
4 信息扫描和更新程序 userflush.php
0) { // 读取和显示弹出窗口 $msg = mysql_fetch_array($result); $numberfriend = $msg['id']; echo " ``` ``` "; } // 设置当前用户的最新时间标志,表示它在线 mysql_query("update userinfo set currentdate=".date("U")." where name='$name'"); // 设置刷新时间间隔为15秒 echo " `````` "; ?>