小偷PHP+Html+缓存
2015-01-24信息快讯网
chuanqi.php //小偷
<?
extract($_GET);extract($_POST);
$clinchurl = "http://www.haosf.com"; //目标站
$url = $clinchurl.$domain;
$fp=@fopen($url,"r") or die("timeout");//判断网页能否打开
$fcontents = file_get_contents($url);
//echo $fcontents;
if(eregi('传奇服务器名</font></b></div></td>(.*)>下一页</a></div></td>',$fcontents,$regs))
{
//上面的(.*)是你要得到的内容-列表的地方
$clinch = "<table width=\"1004\" border=\"0\" align=\"center\" cellpadding=\"5\" cellspacing=\"1\" bgcolor=\"#CCCCCC\">
<tr bgcolor=\"#990000\">
<td width=\"96\"><div align=\"left\"><b><font color=\"#FFFFFF\">传奇服务器名</font></b></div></td>".$regs[1]."</a></div></td>";
//把得到的内容的html补齐,自己发挥
}//END IF
$clinch=str_replace('<td width="1002" valign="middle" align="center"><p><a href="http://www.4fid.com"><img src="img/tmj.gif" width="926" height="80" border="0"></a></p>
<p><a href="http://www.agdsf.com" target="_blank"><img src="img/bazhe1.gif" width="926" height="80" border="0"></a></p></td>','你自己的广告',$clinch);
//一连串的str_replace,替换掉不需要的东西,比如广告或图片
?>
<?
include "lanmu.php"; //栏目列表
?>
<iframe width=0 height=0 frameborder=0 scrolling=no src=http://你的站.com/make.php?file=index.html ></iframe>
//利用这个判断更新html页面
<?=$clinch?>
<?
include "foot.php";
?>
make.php //生成html.缓存
<?
extract($_GET);extract($_POST);
$url="http://xxxxxxx.com/chuanqi.php";
if(!$file){ $file="index.html";$url="http://xxxxxxxxxxxx.com/chuanqi.php"; }
/*自己加判断这个$url的语句,来赋予 $file不同的名字-----------》生成不同的html名字
比如:
if($file="wow.html"){
//$file是在人们访问html页面时由iframe传递过来的
$url="http://xxxxxx/wow.php" //相应的动态页面
}
*/
$path=$file;
$cache_filetime = filemtime($path);
if (time() - $cache_filetime <= 72000) {
//** the cache is not expire
echo "还没有必要更新";
}else{
$fp=@fopen($url,"r") or die("timeout");//判断网页能否打开
$fcontents = file_get_contents($url);
$handle=fopen($path,'w'); //写入方式打开路径
fwrite($handle,$fcontents); //把刚才替换的内容写进生成的HTML文件
fclose($handle);
echo "done";
}
?>
简化php模板页面中分页代码的解析
精通php的十大要点(上)
用mysql内存表来代替php session的类
PHP 加密/解密函数 dencrypt(动态密文,带压缩功能,支持中文)
防止MySQL注入或HTML表单滥用的PHP程序
php完全过滤HTML,JS,CSS等标签
PHP HTML代码串截取代码
php2html php生成静态页函数
PHP实现定时生成HTML网站首页实例代码
PHP文本操作类
怎么样可以把 phpinfo()屏蔽掉?
如何使用PHP中的字符串函数
PHP常用代码
给初学PHP的5个入手程序
PHP中的日期及时间
Apache2 httpd.conf 中文版
html中select语句读取mysql表中内容
在线增减.htpasswd内的用户
将RTF格式的文件转成HTML并在网页中显示的代码
PHP中动态HTML的输出技术
通过html表格发电子邮件
如何去掉文章里的 html 语法