小偷PHP+Html+緩衝_php執行個體

來源:互聯網
上載者:User
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"; 

?>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.