模拟OICQ的实现思路和核心程序(二)
Jun 01, 2016 pm 02:29 PM
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 "";
?>
在网页中使用内置框架来调用扫描和更新程序,这行也能在网页源代码里面看到!
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 "";
?>
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

Hot Article
Repo: How To Revive Teammates
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
How Long Does It Take To Beat Split Fiction?
3 weeks ago
By DDD
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌

Hot tools Tags

Hot Article
Repo: How To Revive Teammates
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
How Long Does It Take To Beat Split Fiction?
3 weeks ago
By DDD
R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
1 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago
By 尊渡假赌尊渡假赌尊渡假赌

Hot Article Tags

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

11 Best PHP URL Shortener Scripts (Free and Premium)

Working with Flash Session Data in Laravel

Build a React App With a Laravel Back End: Part 2, React

Simplified HTTP Response Mocking in Laravel Tests

cURL in PHP: How to Use the PHP cURL Extension in REST APIs

12 Best PHP Chat Scripts on CodeCanyon
