最近学习了正则表达式和小偷程序设计,旁边有玩英雄联盟的朋友,便突发奇想做一个游戏资料库,查看英雄技能等等的,下面是代码,其实是小偷程序,目的是简化web页面,方便手机查看,英雄资料来自多玩英雄联盟资料库。大家看完还可以做其他的资料库,把知识学以致用才是关键!
01 |
02 | header("Content-Type: text/html; charset=utf-8");date_default_timezone_set("Asia/Shanghai"); |
03 | function li($p) |
04 | { |
05 | $l=file_get_contents("http://lol.duowan.com/s/heroes.html"); |
06 |
preg_match_all('! |
07 | $ay=ceil(count($list[1])/30); |
08 | if($p==NULL){$p=1;} |
09 | if($p$ay){die('error');} |
10 | $sta=30*($p-1); |
11 | $end=30*$p; |
12 | for($p2=$sta;$p2 |
13 | {$ys=$p2%3;$m=$list[1][$p2]; |
14 |
if($ys==2){$hh=" ";}else{$hh=" ";} |
15 | if($m!=NULL) |
16 | {$l2=$l2."".$list[3][$p2]."".$hh; |
17 | } |
18 | } |
19 |
$l2=$l2." ";
|
20 | for($dy=1;$dy |
21 | {if($dy!=$p) |
22 | {$l2=$l2." ".$dy." ";} |
23 | else |
24 | {$l2=$l2." ".$dy." ";} |
25 | } |
26 | $time=date("Y.m.d H:i"); |
27 |
$l2=" 英雄联盟—资料库 ".$l2." [ ".$p." / ".$ay."]
|

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Dreamweaver Mac version
Visual web development tools

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

SublimeText3 Chinese version
Chinese version, very easy to use

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software
