栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > PHP

小偷PHP+Html+缓存

PHP 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

小偷PHP+Html+缓存

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('传奇服务器名(.*)>下一页',$fcontents,$regs)) 
 { 
//上面的(.*)是你要得到的内容-列表的地方 
 $clinch = " 
  
 传奇服务器名".$regs[1].""; 
//把得到的内容的html补齐,自己发挥 
 }//END IF 

 $clinch=str_replace('

 
 

','你自己的广告',$clinch); 
//一连串的str_replace,替换掉不需要的东西,比如广告或图片 

?> 
include "lanmu.php"; //栏目列表 
?> 
 
//利用这个判断更新html页面 

 
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"; } 

 

$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"; 

?>
转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/53747.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号