小偷PHP+Html+缓存
2023-06-13 09:13:51 时间
20小时读一次目标的站,可以自己修改,看下就明白怎么弄其他站了,很简单的.
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";
}
?>
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 清楚浏览器缓存,如何清除浏览器缓存「建议收藏」
- Linux下使用PHP开发软件的简易指南(linux下php开发)
- PHP命令执行php文件需要注意的问题详解编程语言
- 学习Linux PHP编程 让你拥有技术之力(linuxphp编程)
- 数据库MySQL 数据库的 PHP 扩展研究(php扩展mysql)
- 管理Linux下PHP目录管理技巧(linuxphp目录)
- 环境PHP和MySQL环境搭建:快速、安全、便捷(php和mysql配置)
- PHP如何获取MySQL版本?(php获取mysql版本)
- 让Linux帮助启动PHP服务(linux启动php)
- 缓存技术的实践基于 Redis 与 PHP 的实现(标签 redis php)
- 利用php和js实现页面数据刷新
- [FAQ]PHP中的一些常识:类篇
- PHP数据缓存技术
- PHP判断变量类型实现代码
- PHP和Mysqlweb应用开发核心技术第1部分Php基础-1开始了解php
- php压缩HTML函数轻松实现压缩html/js/Css及注意事项
- php将gd生成的图片缓存到memcache的小例子
- PHP之APC缓存详细介绍apc模块安装
- 19个超实用的PHP代码片段
- NginxPHP-Fcgi中因PHP执行时间导致504GatewayTimeout错误解决记录