",$replymessage);$replymessage = ereg_replace("">
当前位置:Gxlcms > PHP教程 > 模拟OICQ的实现思路和核心程序(三)_PHP教程

模拟OICQ的实现思路和核心程序(三)_PHP教程

时间:2021-07-01 10:21:17 帮助过:6人阅读

5 聊天信息的发送、阅读和回复程序 - shortalk.php

require("require.php"); // 判断用户是否合法在线的公用程序
?>


短信息






if($action == "view")
{
$tmp = mysql_fetch_array(mysql_query("select sender,body,date from forumtalk where id=$talknumber and receiver='$name'"));
$msg = $tmp['body'];
$message = ereg_replace("
","\r\n",$msg);
mysql_query("update forumtalk set readsign=1 where id=$talknumber");
$sendernickname = mysql_fetch_row(mysql_query("select nickname from userinfo where name='".$tmp['sender']."'"));
?>








查看短信息
给你[]留言:


}
else if ($action == "sendbegin")
{
$replymessage = ereg_replace("\r\n","
",$replymessage);
$replymessage = ereg_replace(">",">",$replymessage);
$replymessage = ereg_replace("<","<",$replymessage);
$replymessage = substr($replymessage,0,2000);
mysql_query("insert into forumtalk (sender,receiver,body,date) values ('$name','$talkto','$replymessage',".date("U").")");
print("");
}
else
{
?>




}
?>

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/315340.htmlTechArticle5 聊天信息的发送、阅读和回复程序 - shortalk.php ? require(require.php); // 判断用户是否合法在线的公用程序 ? html head title短信息/title meta http-eq...

人气教程排行