Home > Backend Development > PHP Tutorial > 模拟OICQ的实现思路和核心程序(二)

模拟OICQ的实现思路和核心程序(二)

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-01 14:29:12
Original
882 people have browsed it
3 在线用户的信息扫描和更新
在网页中使用内置框架来调用扫描和更新程序,这行也能在网页源代码里面看到!


4 信息扫描和更新程序 userflush.php


session_start();
MySQL_connect("localhost","","");
mysql_select_db("php2000");
$delaytime=0;

// 查找新的发言
$query = "select * from forumtalk where readsign=0 and receiver='$name'";
$result = mysql_query($query);
if( mysql_num_rows($result) > 0)
{
// 读取和显示弹出窗口
$msg = mysql_fetch_array($result);
$numberfriend = $msg['id'];
echo "";
}

// 设置当前用户的最新时间标志,表示它在线
mysql_query("update userinfo set currentdate=".date("U")." where name='$name'");

// 设置刷新时间间隔为15秒
echo "";
?> 
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template