自制小型图片采集程序(绕过防盗链)

index.php

<head> <link rel="stylesheet" href="assets/css/amazeui.min.css">
  <link rel="stylesheet" href="assets/css/app.css"></head>
<body style="margin : 10px ">
<ul class="am-list">

<style type="text/css">

	 body{font-size:12px;margin:0 auto;padding:0;}
	 p,ul,li,body,a,small,H1,H2,H3,H4,dl,dt,dd,em,form{list-style:none;font-style:normal;margin:0;padding:0;}.fColor,.fColor a{color:#EE55AC;}.bColor{background:#FE6EC0;padding:1px 2px;}.lineB_Gary{border-bottom:1px #E8E8E8 solid;}.lineT_Gary{border-top:1px #E8E8E8 solid;}.mT5{margin-top:5px;}.mT10{margin-top:10px;}.mB5{margin-bottom:5px;}.dblcok{display:block;}.diblcok{display:inline-block;}UL.pic LI{width:150px;text-align:center;float:left;display:inline;margin:3px 4px;}UL.pic LI a{display:block;background-color:#fff;background-repeat:no-repeat;
#scrolltop{position:fixed;bottom:276px;width:70px;height:120px;overflow:hidden;right:5px;display:none}
#scrolltop em,#scrolltop small{display:block;background: url(../images/show_right_fixed.gif);width:70px;height:57px;cursor:pointer;}
#scrolltop small{background-position:0 -57px;margin-top:6px;}
#appbar { filter:alpha(opacity=90);-moz-opacity:0.9;-khtml-opacity: 0.9;opacity: 0.9; position: fixed;top:0;left:0; text-align: center;border-bottom: #ecaa68 1px solid; background: #FFFFE5;width:100%;height:0px; overflow: hidden; display:none; font-size: 14px;_position: absolute;_top: expressio(documentElement.scrollTop + 0 + "px");}
#appbar strong {display:inline-block;height:30px;line-height:30px;vertical-align: middle;color:#C00000}
#appbar a{display:inline-block;margin-left:30px;margin-top:5px;vertical-align: middle;}
#appbar a em {background:url(../images/icon_client.gif) no-repeat;display:inline-block;height:19px;padding-left:19px; overflow: hidden;line-height:19px;margin-left:10px;}
#appbar a em.ic2{background-position: 0 -19px;}</style>

<?php  
 
$str=file_get_contents('http://www.mnsfz.com/'); 
$str=str_replace('href="','href="./see.php?a=sgfuswefjhbsdjhbjbjahbfiubdshbcxbfwueyshjfbxvjhsdbfkjsdbf丢卒保车weiubirhsdkjcmnxbvjhebkjndaiuwhruirhjsbfbsdnvmx&b=http://www.mnsfz.com',$str);
$str=str_replace('src="/','src="http://www.mnsfz.com/',$str);
$str=str_replace('src="','class="am-img-thumbnail" src="',$str);
$str=str_replace('menu','am-collapse am-topbar-collapse',$str);  //补全url 处理样式

preg_match_all('/<div (.*)<\/div>/iUs', $str,$s);   //匹配内容
//var_dump($str);am-collapse am-topbar-collapse
//var_dump($s);

foreach ($s[0] as $key) 
{
  echo $key;//  if(strlen($key)>=90)echo iconv('GBK','UTF-8',$key);# code...
}
 
?> 
  </ul>
</body>
see.php

<?php
error_reporting(0);

if($_GET['b'])echo '<html>
<head>
<meta http-equiv="Contet-Type" content="text/html; charset=gb2312">
</head>
<body>
<iframe src="'.$_GET['b'].'" width="980" height="1500" frameborder="0" scrolling="no" style="position: absolute; top: -370px; #right: -380px;"></iframe>  
</body>
</html>';<pre name="code" class="php">//用iframe来绕过
?>

 



评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值