3 Online user information scanning and updating
Use the built-in frame in the web page to call the scanning and updating program. This line can also be seen in the web page source code!
4 Information scanning and updating program userflush.php
session_start();
mysql_connect(" localhost","","");
mysql_select_db("php2000");
$delaytime=0;
// Find new comments
$query = "select * from forumtalk where readsign=0 and receiver='$name'";
$result = mysql_query($query);
if( mysql_num_rows($result) > 0)
{
// read Fetch and display the pop-up window
$msg = mysql_fetch_array($result);
$numberfriend = $msg['id'];
echo "";
}
// Set the latest time mark of the current user , indicating that it is online
mysql_query("update userinfo set currentdate=".date("U")." where name='$name'");
// Set the refresh interval to 15 seconds
echo "";
?>