Home >Backend Development >PHP Tutorial >League of Legends Database

League of Legends Database

WBOY
WBOYOriginal
2016-07-25 09:01:412337browse
一个游戏资料库,查看英雄技能等等的,其实是小偷程序,目的是简化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('!
  • 复制代码


    Statement:
    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