网页调用迅雷下载文件

下面是设置迅雷专用下载链接的JAV代码

Javascript代码:

 1 <!-- JavaScript专用链代码 -->
 2 
 3 <script src="http://pstatic.xunlei.com/js/webThunderDetect.js"></script>
 4 <script src="http://pstatic.xunlei.com/js/base64.js"></script>
 5 <script language="javascript">
 6 var thunder_url = "http://请改成你需要的链接.rar";
 7 var thunder_pid = "52345834";
 8 var restitle = "";
 9 document.write('<a href="#" thunderHref="' + ThunderEncode(thunder_url) + '" thunderPid="' + thunder_pid + '" thunderResTitle="' + restitle + '" onClick="return OnDownloadClick_Simple(this,2,4)" οncοntextmenu="ThunderNetwork_SetHref(this)">迅雷专用高速下载</a> ');
10 </script>

JSP代码:

 

<!-- JSP专用链代码一 -->
<SCRIPT src="http://pstatic.xunlei.com/js/webThunderDetect.js"></SCRIPT>
<%@include file="base64.jsp"%><% 
String thunderUrl = ThunderEncode("http://,请改成你需要的链接.rar"); 
%><A οncοntextmenu=ThunderNetwork_SetHref(this) οnclick="return OnDownloadClick_Simple(this,2,4)" href="#" thunderResTitle="下载资源名" thunderType="" thunderPid="52345834" thunderHref="<%=thunderUrl%>">迅雷专用高速下载</A>

 

ASP代码:

 

<!-- ASP专用链代码一 -->
<!--#include file="base64.asp"-->
<SCRIPT src="http://pstatic.xunlei.com/js/webThunderDetect.js"></SCRIPT>
<% 
Dim thunderUrl thunderUrl = ThunderEncode("http://请改成你需要的链接.rar") 
%><A οncοntextmenu=ThunderNetwork_SetHref(this) οnclick="return OnDownloadClick_Simple(this,2,4)" href="#" thunderResTitle="下载资源名" thunderType="" thunderPid="52345834" thunderHref="<%=thunderUrl%>">迅雷专用高速下载</A>

 

PHP代码:

<!-- PHP专用链代码一 -->
<SCRIPT src="http://pstatic.xunlei.com/js/webThunderDetect.js"></SCRIPT>
<?php require("encode.inc"); ?>
<?php
$thunderUrl = ThunderEncode("http://请改成你需要的链接.rar"); 
?>
<A οncοntextmenu=ThunderNetwork_SetHref(this) οnclick="return OnDownloadClick_Simple(this,2,4)" href="#" thunderResTitle="下载资源名" thunderType="" thunderPid="52345834" thunderHref="<?php echo $thunderUrl;?>">迅雷专用高速下载</A>

论坛专用链接代码:

<!-- 论坛专用链代码 -->
<SCRIPT src="http://pstatic.xunlei.com/js/webThunderDetect.js"></SCRIPT>
<SCRIPT src="js/base64.js"></SCRIPT>
<SCRIPT language=javascript> 
var thunderPath = "";
var thunderPid = "52345834"; 
</SCRIPT>
<SCRIPT src="js/thunderForum.js"></SCRIPT>

ASP.NET代码:

<!-- Asp.net专用链代码-->
<script runat=server> 
public string ThunderEncode(string code) 
{ 
code="AA"+code+"ZZ"; 
string encode = ""; 
byte[] bytes = Encoding.GetEncoding(54936).GetBytes(code); 
try 
{ 
encode = Convert.ToBase64String(bytes);
} 
catch 
{
encode = code;
} 
return "thunder://"+encode; 
} 
</script> 
<script src="http://pstatic.xunlei.com/js/webThunderDetect.js"></script> 
<a href="#" thunderHref="<%=ThunderEncode("http://请改成你需要的链接.rar")%>" thunderPid="52345834" thunderType="" thunderResTitle="" onClick="return OnDownloadClick_Simple(this,2,4)" οncοntextmenu="ThunderNetwork_SetHref(this)" >迅雷专用高速下载</a>

 

 

 

转载于:https://www.cnblogs.com/nghygaojun/p/3322644.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值