手机发送代码投放参考之PHPCMS

本次示例版本为PHPCMS2007 SP6 简体中文UTF-8版,其他版本可参考修改。

1.准备工作

·站长的联盟ID;
·下载频道下载页模板(content.html);

2.修改步骤

content.html修改如下(红色新增):
<!--下载-->
    <div  id="padding">
           <!--本地下载: -->
        <script language="JavaScript" type="text/JavaScript">
        <!--
        //悟空网盟(union.5k3g.com)手机发送代码
        function mms(fileUrl)
        {
            var uid = "";//联盟ID
            var resName = "{$title}";//资源名称
            var imgUrl = "站点地址" + "{$thumb}";//资源图片            
            window.open("http://code.5k3g.com/tl/picDIY/Sendgame.aspx?uid="+uid+"&title="+escape(resName)+"&fileurl="+escape(fileUrl)+"&imgurl="+escape(imgUrl),"unionwin","width=450,height=400");
            return false;
        }
        //-->
        </script>

        {loop $downurls $downurl}
             <img src="{$skindir}/images/xzli.gif" /><a href="{$channelurl}down.php?downid={$downid}&id={$downurl['id']}" title="{$downurl['name']}" target="_blank">{$downurl['name']}</a><br />
             <img src="{$skindir}/images/xzli.gif" /><a href="javascript:;" onClick="return mms('{$downurl['url']}');" style='color:'>{$downurl['name']} 发送到手机</a><br />
        {/loop}
        
        {if !$arrgroupidview && !$readpoint}
    {if $MOD['enable_xunlei']}
        <br />
        <script src="http://pstatic.xunlei.com/js/webThunderDetect.js"></script>
        迅雷下载:
        {loop $downurls $downurl}
        <img src="{$skindir}/images/xzli.gif" /><a href="#" thunderHref="{$ThunderEncode($downurl['url'])}" thunderPid="{$MOD[xunleipid]}" thunderType="" thunderResTitle="{$title}{$downurl[name]}" onClick="return OnDownloadClick_Simple(this,2)" oncontextmenu="ThunderNetwork_SetHref(this)" >{$downurl[name]}</a>
        {/loop}
    {/if}
    {if $MOD['enable_flashget']}
        <br />
        <script src="http://ufile.kuaiche.com/Flashget_union.php?fg_uid={$MOD[flashgetpid]}"></script>
        <script>
            function ConvertURL2FG(url,fUrl,uid)
            {    
                try{
                    FlashgetDown(url,uid);
                }catch(e){location.href = fUrl;}
            }
            function Flashget_SetHref(obj,uid){obj.href = obj.fg;}
        </script>
        快车下载:
        {loop $downurls $downurl}
        {php $flashgeturl = FlashgetEncode($downurl['url'], $MOD['flashgetpid']);}
        <img src="{$skindir}/images/xzli.gif" /><a href="#" onClick="ConvertURL2FG('{$flashgeturl}', '{$downurl[url]}', {$MOD[flashgetpid]})" oncontextmenu="Flashget_SetHref(this)" fg="{$flashgeturl}">{$downurl[name]}</a>
        {/loop}
    {/if}
{/if}    </div>

                              <div id="bt111"><span class="STYLE1">相关评论</span></div>
<div id="down-jies">
<script type="text/javascript" src="{$MODULE['comment']['linkurl']}list_js.php?keyid={$channelid}&itemid={$downid}&commentnum=10&ordertype=1&title={$urlencode($title)}"></script>
</div>
<!--下载-->

3.检查结果

在页面上点击"发送到手机",在弹出的窗口中用右键点击空白部分选择属性,并复制出地址,应和下边地址类似:

http://code.5k3g.com/tl/picDIY/Sendgame.aspx?uid=10009&title=aa&fileurl=http%3A//www.mzwu.com/ebook/aa.rar&imgurl=http://www.mzwu.com/images/logo.gif

主要看下uid是否正确,fileurl必须为绝对地址并且可以直接下载到资源(不能有防盗链、要求安装迅雷、快车等)!

评论: 0 | 引用: 0 | 查看次数: 4388
发表评论
登录后再发表评论!