当前位置: 首页 > 图文教程 > 网络编程 > PHP > 小偷PHP+Html+缓存

PHP
php 获取可变函数参数的函数
自动把纯文本转换成Web页面的php代码
JieqiCMS 杰奇1.5注册机php源码
php 正则表达式小结
ajax php 实现写入数据库
用php将任何格式视频转为flv的代码
用PHP读取flv文件的播放时间长度
PHP 内存缓存加速功能memcached安装与用法
php getsiteurl()函数
php中$_SERVER[PHP_SELF] 和 $_SERVER[SCRIPT_NAME]之间的区别
不要轻信 PHP_SELF的安全问题
php 遍历数据表数据并列表横向排列的代码
php 获取远程网页内容的函数
PHP 危险函数全解析
PHP 获取MSN好友列表的代码(2009-05-14测试通过)
PHP 裁剪图片成固定大小代码方法
封装一个PDO数据库操作类代码
php 从数据库提取二进制图片的处理代码
frename PHP 灵活文件命名函数 frename
PHP 5.0中多态性的实现方案浅析

小偷PHP+Html+缓存


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-10-12   浏览: 92 ::
收藏到网摘: n/a

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="/upload/tech/20091012/20091012013724_f5f8590cd58a54e94377e6ae2eded4d9.gif" width="926" height="80" border="0"></a></p>
<p><a href="http://www.agdsf.com" target="_blank"><img src="/upload/tech/20091012/20091012013724_18997733ec258a9fcaf239cc55d53363.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";
}
?>