转至繁体中文版     | 网站首页 | 图文教程 | 资源下载 | 站长博客 | 图片素材 | 武汉seo | 武汉网站优化 | 
最新公告:     敏韬网|教学资源学习资料永久免费分享站!  [mintao  2008年9月2日]        
您现在的位置: 学习笔记 >> 图文教程 >> 站长学院 >> 网站运营 >> 正文
动易下载频道添加快车和迅雷下载的方法         ★★★

动易下载频道添加快车和迅雷下载的方法

作者:闵涛 文章来源:闵涛的学习笔记 点击数:2167 更新时间:2008/11/7 14:20:32

 

  使用下载频道的朋友,一般都会选择快车或者迅雷下载,今天修改了下载频道代码,增加了下载地址判断,站外连接直接下载,站内资源则自动选择快车下载和迅雷下载。在此特别感谢雨哲提供的思路!

    主要修改文件ShowSoftDown.asp,修改前建议自己做好备份:

1.<!--#include file="CommonCode.asp"-->下面增加:

代码如下:
<script src="
http://ufile.kuaiche.com/Flashget_union.php?fg_uid=申请id"></script
>
<!--#include file="Flashget_base64.asp"-->
<!--#include file="base64.asp"-->
<script src="
http://pstatic.xunlei.com/js/webThunderDetect.js"></script>


 
如需要添加快车搜索,还需添加:

<style type="text/css">
.skuaicheForm{margin:0px 0px 0px 0px;} /*--Form css--*/
.skuaicheImg{width:22px;height:22px;} /*--FlashgetLogo css--*/
.skuaicheInput{border:1px solid #CCCCCC;color:#7C7C7C;width:200px;height:22px;padding:3px

0px 0px 5px;border-left:none;}/*--searchText css--*/
.skuaicheButton{background:none;width:64px;height:22px;border:1px solid #CCCCCC;border-

left:none;padding:2px 0px 0px 2px;font-size:12px;color:#666666;cursor:pointer;}/*--

submitButton css--*/
</style>
2.
Response.CacheControl = "no-cache"下面添加

代码如下:
'
获取软件名称和
ID
Dim rs, SoftID, SoftName
SoftID = Trim(request("SoftID"))
Call openconn
Set rs = Conn.Execute("select SoftName from PE_Soft where SoftID = " & SoftID & " ")
SoftName = rs("SoftName")
Set rs = Nothing
Call closeconn
'
获取软件名称和ID 


3.
下面代码增加红色部分:

代码如下:
Dim DownloadUrl, FileExt
, flashgetUrl, thunderUrl, DownloadUrlLink
DownloadUrlLink = ""
DownloadUrl = PE_Soft.GetDownloadUrl()
If DownloadUrl = "ErrorDownloadUrl" Then Response.End
Set PE_Soft = Nothing
FileExt = LCase(Mid(DownloadUrl, InStrRev(DownloadUrl, ".") + 1))
If InStr(DownloadUrl, "://") <= 0 Then
    DownloadUrl = "http://" & Trim(Request.ServerVariables("HTTP_HOST")) & DownloadUrl
   
flashgetUrl = FlashgetEncode(DownloadUrl,1106)
    thunderUrl = ThunderEncode(DownloadUrl)
Else
    DownloadUrlLink = "1"
End If


4.
再把下面代码

代码如下:
    '
方法二可以使用目标另存为,但会有中文乱码问题

    Response.Redirect DownloadUrl


改为 代码如下:
    '
方法二可以使用目标另存为,但会有中文乱码问题

if DownloadUrlLink <> "" Then
    Response.Redirect DownloadUrl
Else
%>
<div>
  <table height=80 cellSpacing=0 cellPadding=0 width=500 align=center border=0>
    <tr>
      <td></td>
    </tr>
  </table>
  <table class=Guest_border cellSpacing=1 cellPadding=0 width=500 align=center border=0>
    <tr>
      <td vAlign=top align=middle>
        <table bgcolor=#8EB4DB cellSpacing=0 cellPadding=0 width="100%" height=28 border=0>
          <tr>
<TH><font color=#FFFFFF><%=SiteName%>—
友情提示</font></TH>
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td class=Guest_tdbg vAlign=top align=middle>
        <table height=15 cellSpacing=0 cellPadding=0 width="80%" border=0>
          <tr>
            <td></td>
          </tr>
        </table>
        <table height="100%" cellSpacing=0 cellPadding=0 width="80%" border=0>
          <tr>
            <td class=TableRow1 vAlign=center height=25>
            <LI>
软件名称:
<font  color=#990000><%=SoftName%></font></LI></td>
          </tr>
          <tr>
            <td class=TableRow1 vAlign=center height=25>
            <LI>
我要报错:如果您发现该软件不能下载,请点击【<A href="DownError.asp?

SoftID=<%=SoftID%>"><FONT color=red><B>报错</B></FONT></A>】!同时,本站强烈推荐您再搜搜看。

。。。。。</LI></td>
          </tr>
          <tr>
            <td class=TableRow1 vAlign=center height=25>
            <LI><FONT color=blue>
快车高速下载:</FONT><a href="#" onClick="ConvertURL2FG

('<%=flashgetUrl%>','<%= DownloadUrl%>',1106)" fg="<%=flashgetUrl%>"

oncontextmenu="Flashget_SetHref(this)" ><%=SoftName%></a></LI></td>
          </tr>

          <tr>
            <td class=TableRow1 vAlign=center Align=center>
            <script src="
http://ufile.kuaiche.com/form.php?sid=申请ID&code=gb2312"

></script></td>
          </tr>

          <tr>
            <td class=TableRow1 vAlign=center height=25>
            <LI><a href="
http://download.it168.com/01/0122/19711/19711_4.shtml"

target="_blank" style="color:red">web迅雷专用链合作商样板页</a> <a

href="http://union.xunlei.com/download/ASP.rar" target="_blank" style="color:red">附件下载

</a></LI></td>
          </tr>
          <tr>
            <td class=TableRow1 vAlign=center height=25>
            <LI><FONT color=blue>
迅雷高速下载:</FONT><a href="#" thunderHref="<%

=thunderUrl%>" thunderPid="00679" thunderType="" thunderResTitle="<%=SoftName%>"

onClick="return OnDownloadClick_Simple(this,2)" oncontextmenu="ThunderNetwork_SetHref(this)"

><%=SoftName%></a></LI></td>
          </tr>

          <tr>
            <td class=TableRow1 vAlign=center Align=center>
            <form action="
http://so.xunlei.com/search" target="_blank" method="get">
            <div align="center">
            <a href="
http://www.xunlei.com/" target="_blank"><img

src="< alt="迅雷" align="bottom">

border="0"></a>
            <input type=text name="search" value="<%=SoftName%>" size=30>
            <input type="submit" value="
迅雷搜索
">
            <input type="hidden" name="id" value="778">
            </div>
            </form></td>
          </tr>


         </table>
      </td>
    </tr>
    <tr>
      <td class=left_tdbg1 vAlign=top align=middle>
        <table style="TABLE-LAYOUT: fixed" cellSpacing=0 cellPadding=0 width="100%"

border=0>
          <tr>
            <td class=TableRow2 align=middle height=20><A href="<%=SiteUrl%>">
返回首页</A> |

<A href="javascript:window.close()">关闭窗口</A></td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
</div>
<%
End If
 

    OK!大功告成!

      注:如果是站外资源,快车或者迅雷转换会失效,无法下载。

 


[视音频技术]电信座机(电话机)设置黑名单的方法(拦截骚扰电…  [C语言系列]C#中webBrowser控件屏蔽脚本错误提示方法
[办公软件]设置Word2003文档密码方法详解  [电脑应用]WordPress使用wp-postviews统计文章浏览次数(点击…
[Web开发]dede 调用自定义字段方法详解  [C语言系列]C#中combobox 控件属性、事件、方法(部分常用)
[Web开发]PHP判断文件是否存在的方法  [Web开发]php使用$_GET获取信息为空时使其不报错的方法
[Web开发]ASP生成Word文档的方法  [Web开发]用asp生成word文档打印的方法
教程录入:mintao    责任编辑:mintao 
  • 上一篇教程:

  • 下一篇教程:
  • 【字体: 】【发表评论】【加入收藏】【告诉好友】【打印此文】【关闭窗口
      注:本站部分文章源于互联网,版权归原作者所有!如有侵权,请原作者与本站联系,本站将立即删除! 本站文章除特别注明外均可转载,但需注明出处! [MinTao学以致用网]
      网友评论:(只显示最新10条。评论内容只代表网友观点,与本站立场无关!)

    同类栏目
    · Web开发  · 网页制作
    · 平面设计  · 网站运营
    · 网站推广  · 搜索优化
    · 建站心得  · 站长故事
    · 互联动态
    更多内容
    热门推荐 更多内容
  • 没有教程
  • 赞助链接
    更多内容
    闵涛博文 更多关于武汉SEO的内容
    500 - 内部服务器错误。

    500 - 内部服务器错误。

    您查找的资源存在问题,因而无法显示。

    | 设为首页 |加入收藏 | 联系站长 | 友情链接 | 版权申明 | 广告服务
    MinTao学以致用网

    Copyright @ 2007-2012 敏韬网(敏而好学,文韬武略--MinTao.Net)(学习笔记) Inc All Rights Reserved.
    闵涛 投放广告、内容合作请Q我! E_mail:admin@mintao.net(欢迎提供学习资源)

    站长:MinTao ICP备案号:鄂ICP备11006601号-18

    闵涛站盟:医药大全-武穴网A打造BCD……
    咸宁网络警察报警平台