-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathfunction.php
49 lines (47 loc) · 1.33 KB
/
function.php
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<?php
/*
第一修改者为作者
修改者:lbr-dev,预留
修改者GITHUB:lbr-dev(https://github.com/lbr-dev/),预留
修改者QQ:lbr-dev(3170482764),预留
本项目开源地址:https://github.com/kingcardconfig/kingcardconfig/
*/
include_once('mainfunction.php');
function gethtml($url,$ua,$timeout,$isgziphtmlfilename){
$header = array("User-Agent:".$ua."");
$isgziphtml =getwebpages($url, $header, $timeout);
if (isgziphtmlapi($isgziphtmlfilename,$isgziphtml) == '1') {
$html=gzdecodeapi($isgziphtml);
} else {
$html=$isgziphtml;
}
return $html;
}
function checkguidandtoken($url,$proxyip,$proxyport,$ua,$guid,$token,$checkguidandtokenhtml,$timeout,$isgziphtmlfilename){
$header = array("User-Agent:".$ua."","Q-GUID:".$guid."","Q-Token:".$token."");
$isgziphtml =checktheproxyserver($url,$proxyip,$proxyport, $header, $timeout);
if (isgziphtmlapi($isgziphtmlfilename,$isgziphtml) == '1') {
$html=gzdecodeapi($isgziphtml);
} else {
$html=$isgziphtml;
}
if ($html == $checkguidandtokenhtml) {
$return="1";
} else {
$return="0";
}
return $return;
}
function getconfigguid($config){
$guid= get_between($config, '"Guid":"', '","Token"');
return $guid;
}
function getconfigtoken($config){
$token= get_between($config, '"Token":"', '"}');
return $token;
}
function getconfigtime($config){
$time= get_between($config, '"Time":"', '","Guid"');
return $time;
}
?>