如何转帖百度,QQ空间,天涯,网易163相册等防盗链图片
本人又比较懒,不想重新下载再上传,只好在网上到处搜索解决办法了~
终于找到方法了~~下边我就教大家如何转帖防盗链图片~~
百度空间,天涯的帖子,还有网易的相册,等等这些网站都有防盗链设置
转帖后,图片会显示,此图片属于XXXXX
经过研究,任何敌人都是纸老虎~
只要努力,就能找到方法~ INTERNET是无敌的~~人民的力量是伟大的,好了,不贫了
下边是我找到的方法
突破限制就可以转帖了,比如百度的图片的URL是这个
http://hiphotos.baidu.com/tangrui6556/pic/item/982f72c497d5b9d939db4907.jpg
我们转帖就会看到
这时候,我们需要用到一个工具,别人编写的图片查看工具,我们通过这个URL的解析,将图片的地址转换一下,就可以打开这些图片了
这样的工具有很多,下边列举几个
http://www.qmxlt.com/showpic.asp?url=
http://www.007520.net/showpic.asp?url=
http://www.0668.cc/showpic.asp?url=
http://www.1u.com.ru/pic.asp?url=
另外可选的还有
http://home.goofar.com/ile8/showpic.asp?url=
http://www.payf.net/showpic.asp?url=
只要将图片的URL放在这些地址的后边
就可正确清晰的显示出我们要的图片了~~
<%
'盗链判断
If Instr(Request.ServerVariables("http_referer"),"http://"&Request.ServerVariables("server_name")&"") = 0 Then
Response.Write "非法链接"
Response.End
End If
Dim url, body, myCache
url = Request.QueryString("url")
Set myCache = new cache
myCache.name = "picindex"&url
If myCache.valid Then
body = myCache.value
Else
body = GetWebData(url)
myCache.add body,dateadd("d",1,now)
End If
If Err.Number = 0 Then
Response.CharSet = "UTF-8"
Response.ContentType = "application/octet-stream"
Response.BinaryWrite body
Response.Flush
Else
Wscript.Echo Err.Description
End if
'取得数据
Public Function GetWebData(ByVal strUrl)
Dim curlpath
curlpath = Mid(strUrl,1,Instr(8,strUrl,"/"))
Dim Retrieval
Set Retrieval = Server.CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", strUrl, False,"",""
.setRequestHeader "Referer", curlpath
.Send
GetWebData =.ResponseBody
End With
Set Retrieval = Nothing
End Function
'cache类
class Cache
private obj 'cache内容
private expireTime '过期时间
private expireTimeName '过期时间application名
private cacheName 'cache内容application名
private path 'url
private sub class_initialize()
path=request.servervariables("url")
path=left(path,instrRev(path,"/"))
end sub
private sub class_terminate()
end sub
public property get blEmpty
'是否为空
if isempty(obj) then
blEmpty=true
else
blEmpty=false
end if
end property
public property get valid
'是否可用(过期)
if isempty(obj) or not isDate(expireTime) then
valid=false
elseif CDate(expireTime)<now then
valid=false
else
valid=true
end if
end property
public property let name(str)
'设置cache名
cacheName=str & path
obj=application(cacheName)
expireTimeName=str & "expires" & path
expireTime=application(expireTimeName)
end property
public property let expires(tm)
'重设置过期时间
expireTime=tm
application.lock
application(expireTimeName)=expireTime
application.unlock
end property
public sub add(var,expire)
'赋值
if isempty(var) or not isDate(expire) then
exit sub
end if
obj=var
expireTime=expire
application.lock
application(cacheName)=obj
application(expireTimeName)=expireTime
application.unlock
end sub
public property get value
'取值
if isempty(obj) or not isDate(expireTime) then
value=null
elseif CDate(expireTime)<now then
value=null
else
value=obj
end if
end property
public sub makeEmpty()
'释放application
application.lock
application(cacheName)=empty
application(expireTimeName)=empty
application.unlock
obj=empty
expireTime=empty
end sub
public function equal(var2)
'比较
if typename(obj)<>typename(var2) then
equal=false
elseif typename(obj)="Object" then
if obj is var2 then
equal=true
else
equal=false
end if
elseif typename(obj)="Variant()" then
if join(obj,"^")=join(var2,"^") then
equal=true
else
equal=false
end if
else
if obj=var2 then
equal=true
else
equal=false
end if
end if
end function
end class
%>
readfile($_GET['url']);
?>
仅仅这样是不够的,这个链接会被其他人盗链,所以我们要改一下东西
if(!eregi($_SERVER['SERVER_NAME'],$_SERVER['HTTP_REFERER']))
{
echo "Please link from librawill.com";
exit();
}
readfile($_GET['url']);
?>
将代码区代码复制存成php文件,上传到服务器,新的外链图片地址就是:
刚才在有啊上看见 有人拿这个卖钱呢
回Wind丶:一两张图片还可以要是组图就太麻烦了!
其实很简单 大家都知道QQ空间相册那些图片按原图就会看不到 其实我们可以在图片按右键 然后按属性 有一个地址 把那个地址复制就可以了 还不明白? 加我QQ 561897884