• 欢迎访问搞代码网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站!
  • 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏搞代码吧

在线短消息收发的程序,不用数据库_PHP

php 搞代码 3年前 (2022-01-25) 18次浏览 已收录 0个评论

login.php
<?if(isset($submit)){
session_start();

$nickname=$name;
session_register(“nickname”);
header(“location:hframe.php”);
}?>

hframe.php
<frameset cols=”0,*”>
<frame name=”contents” src=”autosend.php”>
<frame name=”main” src=”smessage.php”>

<body>

此网页使用了框架,但您的浏览器不支持框架。

smessage.php
<?session_start();
if(isset($submit)){
$fp=fopen(“test.txt”,”a+”);
$temp=”\r\n”.$rmessage.”|”.$content.”|”.$nickname.”|0″;
fputs($fp,$temp);
exit;
}
?>

接收方

内容:

<? session_start();
echo “<meta http-equiv=’refresh’ content=’6;url=autosend.php’>”;
$fl=file(“test.txt”);
$temp=””;
for($i=0;$i<count($fl);$i++){
$sflag=explode(“|”,$fl[$i]);
if(($sflag[3]==0)&&$sfl)本文来(源gaodai#ma#com搞@@代~&码*网2

搞代gaodaima码

ag[0]==$nickname){

echo”<script>window.open(‘list.php?Smessage=$sflag[2]&Content=$sflag[1]’,’newwin’,’toolbar=no location=no’)</script>”;
}else{
$temp.=$fl[$i];
}
}
$fp=fopen(“test.txt”,”w”);
fputs($fp,$temp);
?>
这只是个简单的例子,更多的修饰就靠你自己了!


搞代码网(gaodaima.com)提供的所有资源部分来自互联网,如果有侵犯您的版权或其他权益,请说明详细缘由并提供版权或权益证明然后发送到邮箱[email protected],我们会在看到邮件的第一时间内为您处理,或直接联系QQ:872152909。本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:在线短消息收发的程序,不用数据库_PHP

喜欢 (0)
[搞代码]
分享 (0)
发表我的评论
取消评论

表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址