木子屋 Dnawo's BLOG

手机发送代码投放参考之帝国网站管理系统

👤 dnawo 📅 2008-07-09 👁 5562 👍 0 💬 0 🔄 本站原创
本次示例版本为v4.6,其他版本可参考修改。

1.准备工作

·站长的联盟ID;
·下载页面(e/DownSys/DownSoft/index.php);

2.修改步骤

①在index.php的查询中新增预览图字段(红色新增):
$query="select downpath,id,title[color=Red],titlepic[/color] from {$dbtbpre}ecms_".$class_r[$classid][tbname]." where id='$id' and classid='$classid'";

②在index.php中找到下边代码并修改(红色新增):
//验证码
$pass=md5("wm_chief".$public_r[downpass].$user[userid]);
$url="../../enews?enews=DownSoft&classid=$classid&id=$id&pathid=$pathid&pass=".$pass."&p=".$user[userid].":::".$user[rnd];
[color=Red]//悟空网盟(union.5k3g.com)手机发送代码
$uid = "";//联盟ID
$title = urlencode($r[title]);//资源名称
$httphost = "http://".$_SERVER['HTTP_HOST'];
$fileurl = urlencode("$httphost/e/enews?enews=DownSoft&classid=$classid&id=$id&pathid=$pathid&pass=".$pass."&p=".$user[userid].":::".$user[rnd]);//资源地址
$imgurl = $r[titlepic];//资源图片,没有直接用站点LOGO地址
if(strpos($imgurl,"http://")===false)
{
	$imgurl = $httphost.$r[titlepic];
}
$imgurl = urlencode($imgurl);
$unionurl = "http://code.5k3g.com/tl/picDIY/Sendgame.aspx?uid=$uid&title=$title&fileurl=$fileurl&imgurl=$imgurl";[/color]

③在index.php中增加手机下载链接(红色新增):
<table align=center><tr>
    <td align=center><a href="<?=$url?>"><img src="../../data/images/download.jpg" border=0></a></td>
  </tr>
[color=Red]  <tr>
    <td align=center><a href="<?=$unionurl?>" title="发送到手机" target="_blank"><img src="../../data/images/download.jpg" border=0></a></td>
  </tr>[/color]
</table>

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)

暂无评论。

计算题
评论需审核通过后显示
← 上一篇 使用Environment类获取服务器信息 下一篇 → 说说PHP的字符串查找函数strpos