首页
苏兮影视
随笔记
壁纸
更多
直播
时光轴
友联
关于
统计
Search
1
v2ray节点搭建
1,007 阅读
2
软件添加id功能按钮
919 阅读
3
QQ扫码无法登录的解决方案
820 阅读
4
网易云音乐歌单ID获取教程
686 阅读
5
typecho非常有特色的模块
659 阅读
谈天说地
建站源码
经验教程
资源分享
动漫美图
登录
Search
标签搜索
java
rust
flutter
esp32c3
springboot
安卓
linux
vue
dart
设计模式
docker
joe
快捷键
git
fish shell
maven
redis
netty
groovy
js
尽意
累计撰写
112
篇文章
累计收到
39
条评论
首页
栏目
谈天说地
建站源码
经验教程
资源分享
动漫美图
页面
苏兮影视
随笔记
壁纸
直播
时光轴
友联
关于
统计
搜索到
112
篇与
的结果
2021-01-24
Joe Theme 主题 动态页面 添加音乐
1.找到这个目录,打开文件2.在这两个地方任一添加网易云音乐外链代码,建议吧这个宽度改为100%铺满屏幕完成
2021年01月24日
296 阅读
0 评论
3 点赞
2021-01-24
php表单提交并发送邮件给某个邮箱(示例源码)
首先,建立一个index.html文件,代码如下:<html> <head> <title>Simple Send Mail </title> </head> <body> <h1>Mail Form</h1> <form name="form1" method="post" action="mail.php"> <table> <tr><td><b>To</b></td><td> <input type="text" name="mailto" size="35"> </td></tr> <tr><td><b>Subject</b></td> <td><input type="text" name="mailsubject" size="35"></td> </tr> <tr><td><b>Message</b></td> <td> <textarea name="mailbody" cols="50" rows="7"></textarea> </td> </tr> <tr><td colspan="2"> <input type="submit" name="Submit" value="Send"> </td> </tr> </table> </form> </body> </html>然后新建一个“mail.php”文档把传输的文档进行发送<?php $stm="邮件内容"; require("smtp.php"); ########################################## $smtpserver = "smtp.qq.com";//SMTP服务器 $smtpserverport = "465";//SMTP服务器端口 $smtpusermail = "XXX@qq.com";//SMTP服务器的用户邮箱 $smtpemailto = "AAA@qq.com";//发送给谁 $smtpuser = "XXX@qq.com";//SMTP服务器的用户帐号 $smtppass = "666";//SMTP服务器的用户密码 $mailsubject = "666 ";//邮件主题 $mailbody = $stm;//邮件内容 $mailtype = "HTML";//邮件格式(HTML/TXT),TXT为文本邮件 ########################################## $smtp = new smtp($smtpserver,$smtpserverport,true,$smtpuser,$smtppass);//这里面的一个true是表示使用身份验证,否则不使用身份验证. $smtp->debug = TRUE;//是否显示发送的调试信息 $smtp->sendmail($smtpemailto, $smtpusermail, $mailsubject, $mailbody, $mailtype); echo "<script>alert('邮件发送成功');parent.document.ADDUser.cheheh.click();</script>"; exit; } ?> 最后编写一个邮件类“smtp.php”<?php class smtp { /* Public Variables */ var $smtp_port; var $time_out; var $host_name; var $log_file; var $relay_host; var $debug; var $auth; var $user; var $pass; /* Private Variables */ var $sock; /* Constractor */ function smtp($relay_host = "", $smtp_port = 25,$auth = false,$user,$pass) { $this->debug = FALSE; $this->smtp_port = $smtp_port; $this->relay_host = $relay_host; $this->time_out = 30; //is used in fsockopen() $this->auth = $auth;//auth $this->user = $user; $this->pass = $pass; $this->host_name = "localhost"; //is used in HELO command $this->log_file = ""; $this->sock = FALSE; } /* Main Function */ function sendmail($to, $from, $subject = "", $body = "", $mailtype, $cc = "", $bcc = "", $additional_headers = "") { $mail_from = $this->get_address($this->strip_comment($from)); $body = ereg_replace("(^|(\r\n))(\.)", "\1.\3", $body); $header .= "MIME-Version:1.0\r\n"; if($mailtype=="HTML") { $header .= "Content-Type:text/html\r\n"; } $header .= "To: ".$to."\r\n"; if ($cc != "") { $header .= "Cc: ".$cc."\r\n"; } $header .= "From: $from<".$from.">\r\n"; $header .= "Subject: ".$subject."\r\n"; $header .= $additional_headers; $header .= "Date: ".date("r")."\r\n"; $header .= "X-Mailer:By Redhat (PHP/".phpversion().")\r\n"; list($msec, $sec) = explode(" ", microtime()); $header .= "Message-ID: <".date("YmdHis", $sec).".".($msec*1000000).".".$mail_from.">\r\n"; $TO = explode(",", $this->strip_comment($to)); if ($cc != "") { $TO = array_merge($TO, explode(",", $this->strip_comment($cc))); } if ($bcc != "") { $TO = array_merge($TO, explode(",", $this->strip_comment($bcc))); } $sent = TRUE; foreach ($TO as $rcpt_to) { $rcpt_to = $this->get_address($rcpt_to); if (!$this->smtp_sockopen($rcpt_to)) { $this->log_write("Error: Cannot send email to ".$rcpt_to."\n"); $sent = FALSE; continue; } if ($this->smtp_send($this->host_name, $mail_from, $rcpt_to, $header, $body)) { $this->log_write("E-mail has been sent to <".$rcpt_to.">\n"); } else { $this->log_write("Error: Cannot send email to <".$rcpt_to.">\n"); $sent = FALSE; } fclose($this->sock); $this->log_write("Disconnected from remote host\n"); } return $sent; } /* Private Functions */ function smtp_send($helo, $from, $to, $header, $body = "") { if (!$this->smtp_putcmd("HELO", $helo)) { return $this->smtp_error("sending HELO command"); } #auth if($this->auth) { if (!$this->smtp_putcmd("AUTH LOGIN", base64_encode($this->user))) { return $this->smtp_error("sending HELO command"); } if (!$this->smtp_putcmd("", base64_encode($this->pass))) { return $this->smtp_error("sending HELO command"); } } if (!$this->smtp_putcmd("MAIL", "FROM:<".$from.">")) { return $this->smtp_error("sending MAIL FROM command"); } if (!$this->smtp_putcmd("RCPT", "TO:<".$to.">")) { return $this->smtp_error("sending RCPT TO command"); } if (!$this->smtp_putcmd("DATA")) { return $this->smtp_error("sending DATA command"); } if (!$this->smtp_message($header, $body)) { return $this->smtp_error("sending message"); } if (!$this->smtp_eom()) { return $this->smtp_error("sending <CR><LF>.<CR><LF> [EOM]"); } if (!$this->smtp_putcmd("QUIT")) { return $this->smtp_error("sending QUIT command"); } return TRUE; } function smtp_sockopen($address) { if ($this->relay_host == "") { return $this->smtp_sockopen_mx($address); } else { return $this->smtp_sockopen_relay(); } } function smtp_sockopen_relay() { $this->log_write("Trying to ".$this->relay_host.":".$this->smtp_port."\n"); $this->sock = @fsockopen($this->relay_host, $this->smtp_port, $errno, $errstr, $this->time_out); if (!($this->sock && $this->smtp_ok())) { $this->log_write("Error: Cannot connenct to relay host ".$this->relay_host."\n"); $this->log_write("Error: ".$errstr." (".$errno.")\n"); return FALSE; } $this->log_write("Connected to relay host ".$this->relay_host."\n"); return TRUE;; } function smtp_sockopen_mx($address) { $domain = ereg_replace("^.+@([^@]+)$", "\1", $address); if (!@getmxrr($domain, $MXHOSTS)) { $this->log_write("Error: Cannot resolve MX \"".$domain."\"\n"); return FALSE; } foreach ($MXHOSTS as $host) { $this->log_write("Trying to ".$host.":".$this->smtp_port."\n"); $this->sock = @fsockopen($host, $this->smtp_port, $errno, $errstr, $this->time_out); if (!($this->sock && $this->smtp_ok())) { $this->log_write("Warning: Cannot connect to mx host ".$host."\n"); $this->log_write("Error: ".$errstr." (".$errno.")\n"); continue; } $this->log_write("Connected to mx host ".$host."\n"); return TRUE; } $this->log_write("Error: Cannot connect to any mx hosts (".implode(", ", $MXHOSTS).")\n"); return FALSE; } function smtp_message($header, $body) { fputs($this->sock, $header."\r\n".$body); $this->smtp_debug("> ".str_replace("\r\n", "\n"."> ", $header."\n> ".$body."\n> ")); return TRUE; } function smtp_eom() { fputs($this->sock, "\r\n.\r\n"); $this->smtp_debug(". [EOM]\n"); return $this->smtp_ok(); } function smtp_ok() { $response = str_replace("\r\n", "", fgets($this->sock, 512)); $this->smtp_debug($response."\n"); if (!ereg("^[23]", $response)) { fputs($this->sock, "QUIT\r\n"); fgets($this->sock, 512); $this->log_write("Error: Remote host returned \"".$response."\"\n"); return FALSE; } return TRUE; } function smtp_putcmd($cmd, $arg = "") { if ($arg != "") { if($cmd=="") { $cmd = $arg; } else { $cmd = $cmd." ".$arg; } } fputs($this->sock, $cmd."\r\n"); $this->smtp_debug("> ".$cmd."\n"); return $this->smtp_ok(); } function smtp_error($string) { $this->log_write("Error: Error occurred while ".$string.".\n"); return FALSE; } function log_write($message) { $this->smtp_debug($message); if ($this->log_file == "") { return TRUE; } $message = date("M d H:i:s ").get_current_user()."[".getmypid()."]: ".$message; if (!@file_exists($this->log_file) || !($fp = @fopen($this->log_file, "a"))) { $this->smtp_debug("Warning: Cannot open log file \"".$this->log_file."\"\n"); return FALSE;; } flock($fp, LOCK_EX); fputs($fp, $message); fclose($fp); return TRUE; } function strip_comment($address) { $comment = "\([^()]*\)"; while (ereg($comment, $address)) { $address = ereg_replace($comment, "", $address); } return $address; } function get_address($address) { $address = ereg_replace("([ \t\r\n])+", "", $address); $address = ereg_replace("^.*<(.+)>.*$", "\1", $address); return $address; } function smtp_debug($message) { if ($this->debug) { //echo $message; } } } ?><?php class smtp { /* Public Variables */ var $smtp_port; var $time_out; var $host_name; var $log_file; var $relay_host; var $debug; var $auth; var $user; var $pass; /* Private Variables */ var $sock; /* Constractor */ function smtp($relay_host = "", $smtp_port = 25,$auth = false,$user,$pass) { $this->debug = FALSE; $this->smtp_port = $smtp_port; $this->relay_host = $relay_host; $this->time_out = 30; //is used in fsockopen() $this->auth = $auth;//auth $this->user = $user; $this->pass = $pass; $this->host_name = "localhost"; //is used in HELO command $this->log_file = ""; $this->sock = FALSE; } /* Main Function */ function sendmail($to, $from, $subject = "", $body = "", $mailtype, $cc = "", $bcc = "", $additional_headers = "") { $mail_from = $this->get_address($this->strip_comment($from)); $body = ereg_replace("(^|(\r\n))(\.)", "\1.\3", $body); $header .= "MIME-Version:1.0\r\n"; if($mailtype=="HTML") { $header .= "Content-Type:text/html\r\n"; } $header .= "To: ".$to."\r\n"; if ($cc != "") { $header .= "Cc: ".$cc."\r\n"; } $header .= "From: $from<".$from.">\r\n"; $header .= "Subject: ".$subject."\r\n"; $header .= $additional_headers; $header .= "Date: ".date("r")."\r\n"; $header .= "X-Mailer:By Redhat (PHP/".phpversion().")\r\n"; list($msec, $sec) = explode(" ", microtime()); $header .= "Message-ID: <".date("YmdHis", $sec).".".($msec*1000000).".".$mail_from.">\r\n"; $TO = explode(",", $this->strip_comment($to)); if ($cc != "") { $TO = array_merge($TO, explode(",", $this->strip_comment($cc))); } if ($bcc != "") { $TO = array_merge($TO, explode(",", $this->strip_comment($bcc))); } $sent = TRUE; foreach ($TO as $rcpt_to) { $rcpt_to = $this->get_address($rcpt_to); if (!$this->smtp_sockopen($rcpt_to)) { $this->log_write("Error: Cannot send email to ".$rcpt_to."\n"); $sent = FALSE; continue; } if ($this->smtp_send($this->host_name, $mail_from, $rcpt_to, $header, $body)) { $this->log_write("E-mail has been sent to <".$rcpt_to.">\n"); } else { $this->log_write("Error: Cannot send email to <".$rcpt_to.">\n"); $sent = FALSE; } fclose($this->sock); $this->log_write("Disconnected from remote host\n"); } return $sent; } /* Private Functions */ function smtp_send($helo, $from, $to, $header, $body = "") { if (!$this->smtp_putcmd("HELO", $helo)) { return $this->smtp_error("sending HELO command"); } #auth if($this->auth) { if (!$this->smtp_putcmd("AUTH LOGIN", base64_encode($this->user))) { return $this->smtp_error("sending HELO command"); } if (!$this->smtp_putcmd("", base64_encode($this->pass))) { return $this->smtp_error("sending HELO command"); } } if (!$this->smtp_putcmd("MAIL", "FROM:<".$from.">")) { return $this->smtp_error("sending MAIL FROM command"); } if (!$this->smtp_putcmd("RCPT", "TO:<".$to.">")) { return $this->smtp_error("sending RCPT TO command"); } if (!$this->smtp_putcmd("DATA")) { return $this->smtp_error("sending DATA command"); } if (!$this->smtp_message($header, $body)) { return $this->smtp_error("sending message"); } if (!$this->smtp_eom()) { return $this->smtp_error("sending <CR><LF>.<CR><LF> [EOM]"); } if (!$this->smtp_putcmd("QUIT")) { return $this->smtp_error("sending QUIT command"); } return TRUE; } function smtp_sockopen($address) { if ($this->relay_host == "") { return $this->smtp_sockopen_mx($address); } else { return $this->smtp_sockopen_relay(); } } function smtp_sockopen_relay() { $this->log_write("Trying to ".$this->relay_host.":".$this->smtp_port."\n"); $this->sock = @fsockopen($this->relay_host, $this->smtp_port, $errno, $errstr, $this->time_out); if (!($this->sock && $this->smtp_ok())) { $this->log_write("Error: Cannot connenct to relay host ".$this->relay_host."\n"); $this->log_write("Error: ".$errstr." (".$errno.")\n"); return FALSE; } $this->log_write("Connected to relay host ".$this->relay_host."\n"); return TRUE;; } function smtp_sockopen_mx($address) { $domain = ereg_replace("^.+@([^@]+)$", "\1", $address); if (!@getmxrr($domain, $MXHOSTS)) { $this->log_write("Error: Cannot resolve MX \"".$domain."\"\n"); return FALSE; } foreach ($MXHOSTS as $host) { $this->log_write("Trying to ".$host.":".$this->smtp_port."\n"); $this->sock = @fsockopen($host, $this->smtp_port, $errno, $errstr, $this->time_out); if (!($this->sock && $this->smtp_ok())) { $this->log_write("Warning: Cannot connect to mx host ".$host."\n"); $this->log_write("Error: ".$errstr." (".$errno.")\n"); continue; } $this->log_write("Connected to mx host ".$host."\n"); return TRUE; } $this->log_write("Error: Cannot connect to any mx hosts (".implode(", ", $MXHOSTS).")\n"); return FALSE; } function smtp_message($header, $body) { fputs($this->sock, $header."\r\n".$body); $this->smtp_debug("> ".str_replace("\r\n", "\n"."> ", $header."\n> ".$body."\n> ")); return TRUE; } function smtp_eom() { fputs($this->sock, "\r\n.\r\n"); $this->smtp_debug(". [EOM]\n"); return $this->smtp_ok(); } function smtp_ok() { $response = str_replace("\r\n", "", fgets($this->sock, 512)); $this->smtp_debug($response."\n"); if (!ereg("^[23]", $response)) { fputs($this->sock, "QUIT\r\n"); fgets($this->sock, 512); $this->log_write("Error: Remote host returned \"".$response."\"\n"); return FALSE; } return TRUE; } function smtp_putcmd($cmd, $arg = "") { if ($arg != "") { if($cmd=="") { $cmd = $arg; } else { $cmd = $cmd." ".$arg; } } fputs($this->sock, $cmd."\r\n"); $this->smtp_debug("> ".$cmd."\n"); return $this->smtp_ok(); } function smtp_error($string) { $this->log_write("Error: Error occurred while ".$string.".\n"); return FALSE; } function log_write($message) { $this->smtp_debug($message); if ($this->log_file == "") { return TRUE; } $message = date("M d H:i:s ").get_current_user()."[".getmypid()."]: ".$message; if (!@file_exists($this->log_file) || !($fp = @fopen($this->log_file, "a"))) { $this->smtp_debug("Warning: Cannot open log file \"".$this->log_file."\"\n"); return FALSE;; } flock($fp, LOCK_EX); fputs($fp, $message); fclose($fp); return TRUE; } function strip_comment($address) { $comment = "\([^()]*\)"; while (ereg($comment, $address)) { $address = ereg_replace($comment, "", $address); } return $address; } function get_address($address) { $address = ereg_replace("([ \t\r\n])+", "", $address); $address = ereg_replace("^.*<(.+)>.*$", "\1", $address); return $address; } function smtp_debug($message) { if ($this->debug) { //echo $message; } } } ?>
2021年01月24日
365 阅读
3 评论
4 点赞
阿里云域名如何在腾讯云服务器解析使用的具体流程
阿里云域名如何在腾讯云服务器使用的具体流程是什么?前言:因为我开始也是在阿里云买的域名,后来因为多方面因素选择了腾讯云服务器,这时候就涉及到在阿里云注册的域名,如何在腾讯云服务器上使用的操作流程了。对于新手来说横跨两大云服务商家的操作是很麻烦的,尤其是没操作过的人来说更是这样。话不多说,直接开启教程对于阿里云域名想要在别家服务器商家使用的话,需要修改域名 DNS服务器地址,把域名管理权交给腾讯云去管理。一、点我直达阿里云网站,找到并点击右上角“控制台”,在我的云产品中点击“域名”进入域名控制台。找到你想部署的域名最右侧,点击“管理”,修改 DNS地址为截图中的腾讯云 DNS地址。如果提示“已开启[禁止更新锁],该功能暂不可用”,这是阿里云的安全机制作用了,需要你去手动关闭,按照提示操作,提供相应的手机验证码即可。改完了之后(这里我已经修改过了),域名的管理权就迁移到腾讯云去了,以后域名解析、部署等都在腾讯云那里管理。但是域名续费、过户还是在阿里云这里管理的,大家要分清楚这个关系。二、腾讯云服务器自行购买腾讯云服务器。三、做接入备案因为之前的域名在阿里云申请的,现在放到腾讯云服务器上使用,需要在腾讯云做接入备案。接入备案其实和新域名备案差不多的过程,几乎没有区别。详情可自行百度,各大论坛都有,这里就不多说了。四、添加腾讯云解析备案时间看管局审批时间,如果正常的话,3天~20天都有可能,这时间内大家要耐心等待吧,企盼管局别出什么幺蛾子,顺利下号。拿到备案号之后就可以正常做域名解析到服务器 IP了。点我直达腾讯云官网,搜索“云解析”,点击添加记录,可选添加 A记录或者 CNAME记录。添加 A记录的话,域名直接指向服务器 IP地址;添加 CNAME记录是以 CDN加速的方式访问网站。建议选择后者,可以隐藏 IP 和加快网站访问速度。腾讯云每个月送免费 10G流量使用,包含 http 和 https 流量在一起了,不够用也可以付费购买,很便宜的。添加完解析后使用宝塔面板搭建环境,建站之类的就不说了,大家应该都知道接下来怎么操作了。由此就完成了阿里云域名在腾讯云服务器使用的操作流程。
2021年01月23日
287 阅读
0 评论
10 点赞
当你走到足够高的高度 你会发现自己身边全是好人
1、当你走到足够高的高度,你会发现自己身边,全是好人。2、每一天的云都是不同形状的,你老低头怎么看得见啊!3、手上是生活,眼里是希望。4、给时间生命,而不是给生命时间。5、如果一个人不知道他要驶向哪个码头,那么任何风都不会是顺风。6、没有绝望的处境,只有绝望的心,就算什么也不能改变了,至少你还能改变你的态度。7、拥有一颗永不放弃的心比拥有一颗钻石还要珍贵。8、 人只要有一种向上的精神,朝着自己的目标一步步努力,成功的机会就会越来越大。9、成功不是一句话,而是无数个朝着目标前行的行动。只要努力,你就能成为你想成为的人。10、只要你勇敢地说出再见,生活一定会赐予你一个新的开始。11、世上有两种最耀眼的光芒,一种是太阳,一种是我们努力的模样。12、 人生就是一场修行,修的是自己的心。修行,就是扩大自己的心量。心量越大,自己的舞台就越大,能容的东西就越多。13、当一个人真正觉悟的一刻,他放弃追寻外在世界的财富,而开始追寻他内心世界的真正财富。14、每天早上醒来,你荷包里的最大资产是24个小时——你生命宇宙中尚未制造的材料。15、拧成一股绳,搏尽一份力,狠下一条心,共圆一个梦。16、幸福和幸运是需要代价的,天下没有免费的午餐!17、业精于勤,荒于嬉;行成于思,毁于随。18、生命需要有裂缝,阳光才能照进来。19、 时间就像一张网,你撒在哪里,你的收获就在哪里。20、幸福不会遗漏任何人,迟早有一天它会找到你。21、不必太纠结于当下, 也不必太忧虑未来, 当你经历过一些事情的时候,眼前的风景已经和从前不一样了。22、未来是一片迷雾,令人胆怯,但不妨走下去,看看命运给我们准备了什么。
2021年01月22日
198 阅读
0 评论
1 点赞
2020-12-20
QQxml消息卡片生成源码
QQ XML消息自定义生成源码 这款源码是一个非常实用的 可以用来引流 可以让分享出来的普通网址变为卡片消息 比如自定义内容 有些友友们 好奇心 这样就可以增加大家的点击了下载地址:https://suxii.lanzous.com/iHtMVjjqfmb
2020年12月20日
607 阅读
1 评论
2 点赞
1
...
21
22
23