找回密码
 注册
搜索
免费空间 免费域名 免费AI 老牌主机商首月仅1美分!27美元/年!Spaceship优惠码 Namecheap优惠码阿里云2核2G3M新老续费同享99元/年!
查看: 901|回复: 10

[程序代码] 请教个问题

[复制链接]
发表于 2011-5-7 17:21:26 | 显示全部楼层 |阅读模式
  1. <?php
  2. /*
  3. * (C) Copyright 2009-2010 115.com All Rights Reserved
  4. *
  5. * 115网盘外链php版
  6. * 空间需要支持allow_url_fopen
  7. * 外链形式:http://hx.8.je/115.php/提取码/xxx
  8. * 2011.04.10亲测有效
  9. * 原作者 haowenq  获取地址更新:kkbblzq
  10. *
  11. */
  12. $uri = $_SERVER["REQUEST_URI"];
  13. preg_match("/115.php\/(.+)\//",$uri,$code);//自己修改
  14. $code = $code[1];
  15. $opts = array(
  16. 'http'=>array('method'=>"GET",'header'=>"User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.3)\r\n")
  17. );//伪造User-Agent
  18. $context = stream_context_create($opts);
  19. $url = "http://u.115.com/?ct=upload_api&ac=get_pick_code_info&pickcode=".$code."&version=1169";//获得原始下载地址
  20. $data = file_get_contents($url,false,$context);
  21. $data = str_replace("\","",$data);
  22. preg_match_all("/"Url":"(.*?)"/", $data, $data);
  23. $myurl = $data[1][2];//获得备份下载
  24. if($myurl){
  25. header('Content-Type:application/force-download');//强制下载
  26. header("Location:".$myurl);
  27. die();
  28. }
  29. else echo "提取码不存在或已过期";
  30. ?>
复制代码
这个是115网盘外链的程序。我想问下为什么用 http://jj.mu/115.php  可以用,外链成功
但是我把他放下文件夹里面,名字该成index.php  然后用二级域名 http://115.jj.mu 这样就不可以外链
把这句里面的115.php改成 index.php 也不行。
  1. preg_match("/115.php\/(.+)\//",$uri,$code);//自己修改
复制代码
教我拉。谢谢了。
发表于 2011-5-7 17:28:45 | 显示全部楼层
矜持妹子来了啊!
 楼主| 发表于 2011-5-7 17:40:32 | 显示全部楼层
回复 2# TMD


    回答我问题啊
发表于 2011-5-7 17:58:51 | 显示全部楼层
矜持妹子来了啊!
发表于 2011-5-7 18:00:11 | 显示全部楼层
不懂!
等楼下回答
发表于 2011-5-7 22:11:18 | 显示全部楼层
根据php的特性,要搭配伪静态才能实现你想要的。
 楼主| 发表于 2011-5-8 08:44:21 | 显示全部楼层
回复 5# haowenq


    你签名那个怎么弄的。
 楼主| 发表于 2011-5-8 08:44:41 | 显示全部楼层
回复 6# 哈哈大侠


    能说详细点嘛
发表于 2011-5-8 12:22:19 | 显示全部楼层
矜持妹子来了啊!
发表于 2011-5-8 14:23:14 | 显示全部楼层
come on baby
您需要登录后才可以回帖 登录 | 注册

本版积分规则

手机版|小黑屋|免费吧论坛

GMT+8, 2024-5-5 12:29 , Processed in 0.027804 second(s), 5 queries , Redis On.

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表