-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtmp.php
More file actions
26 lines (19 loc) · 3.03 KB
/
tmp.php
File metadata and controls
26 lines (19 loc) · 3.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
$urls = ['p101','p102','p103','p104','p105','b01','b02','b03','b04','b05','b06','b07','b08','b09','b10','b11','b12','b13','b14','b15','b16','c01','c02','c03','c04','c05','c06','c07','c08','c09','c10','c11','c12','c13','c14','c15','c16','c17','c18','c19','c20','c21','c22','c23','c24','c25','c26','c27','c28','c29','c30','c31','c32','c33','c34','c35','d01','d02','d03','d04','d05','d06','d07','d08','d09','d10','d11','d12','d13','d14','d15','d16','d17','d18','d19','d20','d21','d22','d23','e01','e02','e03','e04','e05','f01','f02','f03','f04','f05','f06','f07','f08','f09','g01','g02','g03','g04','g05','g06','g07','g08','g09','g10','g11','g12','g13','g14','g15','g16','g17','g18','g19','h01','h02','h03','h04','h05','h06','h07','h08','h09','h11','h12','h13','h14','h15','h16','h17','h18','h19','h20','j01','j02','j03','j04','j05','j06','j07','j08','j09','j10','j11','j12','j13','j14','k01','k02','k03','k04','k05','k06','k07','k08','k09','k10','k11','k12','k13','k14','k15','k16','k17','k18','l01','l02','l03','l04','l05','l06','l07','l08','l09','l10','l11','l12','l13','l14','l15','l16','l17','l18','l19','l20','l21','l22','l23','l24','l25','l26','m01','m02','m03','m04','m05','m06','m07','m08','m09','m10','m11','m12','m13','m14','m15','m16','m17','m18','m19','m20','n01','n02','n03','n04','n05','n06','n07','n08','n09','n10','n11','n12','n13','n14','n15','n16','n17','n18','n19','n20','n21','n22','n23','n24','n25','n26','o01','o02','p01','p02','p03','p04','p05','p06','p07','p08','p09','p10','p11','p12','p13','p14','p15','p16','p17','q01','q02','q03','q04','q05','q06','q07','q08','q09','q10','q11','q12','q13','q14','r01','r02','r03','r04','r05','r06','r07','r08','r09','r10','r11','r12','r13','r14','s01','s02','s03','s04','s05','s06','s07','s08','s09','s10','s11','s12','s13','s14','s15','s16','s17','s18','s19','s20','s21','s22','s23','s24','s25','s26','s27','s28','s29','s30','s31','s32','s33','s34','s35','t01','t02','t03','t04','t05','t06','t07','t08','t09','t10','t11','t12','t13','t14','t15','t16','t17','t18','t19','w01','w02','w03','w04','w05','w06','w07','w08','w09','x01','x02','x03','x04','x05','x06','x07','x08','x09','x10','x11','x12','x13','x14','y01','y02','y03','y04','y05','y06','y07','y08','y09','y10','y11','y12','y13','y14','y15','z01','z02','z03','z04','z05','z06','z07','z08','z09','z10','z11','z12','z13','z14','z15','z16','z17','z18','z19','z20','z21','z22','z23','z24','z25','z26','z27','z28','z29','z30','z31','z32','z33','z34','z35','z36','z37'];
require 'vendor/autoload.php';
$curl = new Curl();
$cnt = count($urls);
foreach ($urls as $key => $url) {
$url = 'http://xh.5156edu.com/html2/' . $url . '.html';
$html = $curl->get($url);
echo PHP_EOL,$url, " $key/$cnt",PHP_EOL;
preg_match_all('/<font color=red>(.*?)<\/font>/',$html, $match);
file_put_contents('tmp.log', "\n\n" . $match[1][0] . "\n",FILE_APPEND);
echo $match[1][0],PHP_EOL;
preg_match_all('/>([^ ]*?)<\/p><p/',$html, $match);
foreach ($match[1] as $key => $m) {
file_put_contents('tmp.log', trim($m,',') . " ",FILE_APPEND);
echo ($m . "\t");
}
}
echo 'end';