League of Legends Database

WBOY
Release: 2016-07-25 09:01:41
Original
2259 people have browsed it
一个游戏资料库,查看英雄技能等等的,其实是小偷程序,目的是简化web页面,方便手机查看,英雄资料来自多玩英雄联盟资料库 效果看http://vwap.com.nu 源码说明在我的小站http://wapxz.tk/v/download.php?id=1030
  1. header("Content-Type: text/html; charset=utf-8");date_default_timezone_set("Asia/Shanghai");
  2. function li($p)
  3. {
  4. $l=file_get_contents("http://lol.duowan.com/s/heroes.html");
  5. preg_match_all('!(.*)<\/h3>.*(.*)<\/span>.*<\/li>!suU',$l,$list);
  6. $ay=ceil(count($list[1])/30);
  7. if($p==NULL){$p=1;}
  8. if($p<0||$p>$ay){die('error');}
  9. $sta=30*($p-1);
  10. $end=30*$p;
  11. for($p2=$sta;$p2<$end;$p2++)
  12. {$ys=$p2%3;$m=$list[1][$p2];
  13. if($ys==2){$hh="
    ";}else{$hh="| ";}
  14. if($m!=NULL)
  15. {$l2=$l2."".$list[3][$p2]."".$hh;
  16. }
  17. }
  18. $l2=$l2."
    ";
  19. for($dy=1;$dy<=$ay;$dy++)
  20. {if($dy!=$p)
  21. {$l2=$l2." ".$dy." ";}
  22. else
  23. {$l2=$l2." ".$dy." ";}
  24. }
  25. $time=date("Y.m.d H:i");
  26. $l2="英雄联盟—资料库|WAP在线
    英雄联盟—资料库
    ".$l2." [ ".$p." / ".$ay."]
";
  • return $l2;
  • }
  • //尊重作者,是对我们最大的鼓励。
  • function gk($b)
  • {preg_match_all('!LOL英雄联盟专区<\/a>><\/span>英雄资料<\/a>><\/span>(.*)<\/div>!suU',$b[0][0],$heroname);
  • preg_match_all('!

    (.*)(.*)<\/span>(.*)<\/span><\/p>!suU',$b[0][0],$money);

  • preg_match_all('!

    英雄标签:<\/h3>(.*)

    (.*)<\/p>!suU',$b[0][0],$tag);

  • preg_match_all('!
    (.*)<\/div>!suU',$b[0][0],$dj);
  • preg_match_all('!
      (.*)<\/ul>!suU',$b[0][0],$cz);
    • $cz=str_replace("

      ","
      ",$cz[1][1]);

    • $cz=str_replace("","",$cz);
    • $cz=strip_tags($cz,"
      ");
    • $out="".$heroname[1][0]."

      ".$heroname[1][0]."

      英雄概况
      国服:".$money[2][0]." / ".$money[4][0]."
      美服:".$money[2][1]." / ".$money[4][1]."
      英雄标签:".$tag[2][0]."
      物理攻击:".$dj[1][1]." | 法术攻击:".$dj[1][2]."
      生命数值:".$dj[1][0]." | 操作难度:".$dj[1][3]."
      成长能力
      ".$cz;
    • return $out;
    • }
    • function jn($b)
    • {preg_match_all('!
    • \s*(.*)

      (.*)<\/h4>(.*)<\/p>(.*)(
      )?(.*)<\/div>\s*<\/li>!suU',$b[0][0],$jn);

    • $out2="英雄技能详情
      英雄技能详情
      ".$jn[3][0]."
      ".$jn[4][0]."
      ".$jn[7][0]."
      ".$jn[3][1]."
      ".$jn[4][1]."
      ".$jn[7][1]."
      ".$jn[3][2]."
      ".$jn[4][2]."
      ".$jn[7][2]."
      ".$jn[3][3]."
      ".$jn[4][3]."
      ".$jn[7][3]."
      ".$jn[3][4]."
      ".$jn[4][4]."
      ".$jn[7][4]."
      ";
    • return $out2;
    • }
    • //技巧
    • function jq($b)
    • {preg_match_all('!
      \s*

      (.*)<\/h3>(.*)<\/div>!suU',$b[0][0],$jq);

    • $out3="英雄技巧与提示

      英雄技巧与提示

      ".$jq[1][0].$jq[2][0]."
      ".$jq[1][1].$jq[2][1]."
      ";
    • return $out3;
    • }
    • $n=$_GET["n"];
    • $m=$_GET["m"];
    • $y=$_GET["y"];
    • $head='
    • ';
    • $foot="";
    • $url="http://lol.duowan.com/heros/".$n."/";
    • curl_setopt($ch, CURLOPT_URL,$url);
    • curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    • // 指定代理地址
    • curl_setopt($ch, CURLOPT_PROXY, '202.108.50.72:80');
    • $a = curl_exec($ch);
    • curl_close ($ch);**/
    • $a=file_get_contents($url);
    • $d1='!您的当前位置(.*)
      !su';
    • preg_match_all($d1,$a,$b);
    • //preg_match_all($d2,$b[0][0],$b2);
    • if($n==NULL)
    • {$body=li($y);}
    • else
    • {if($m==1){$body=jn($b);}
    • elseif($m==2){$body=jq($b);}
    • else{$body=gk($b);}
    • }
    • echo $head.$css1.$body;
    • if($n!=Null)
    • {echo $foot;}
    • ?>
  • 复制代码


    Related labels:
    source:php.cn
    Statement of this Website
    The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
    Popular Tutorials
    More>
    Latest Downloads
    More>
    Web Effects
    Website Source Code
    Website Materials
    Front End Template
    About us Disclaimer Sitemap
    php.cn:Public welfare online PHP training,Help PHP learners grow quickly!