-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcheckCard.php
More file actions
65 lines (44 loc) · 1.48 KB
/
checkCard.php
File metadata and controls
65 lines (44 loc) · 1.48 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
ini_set('display_errors', '1');
ini_set('error_log', dirname(__FILE__) . '/error_log.txt');
require('database.php');
require('method.php');
session_start();
$username = 'NOT_EXIST';
@$username = $_SESSION['un'];
$ret = SQL("SELECT * FROM `graduation_prom_2018_account` WHERE `username` = '$username'");
$identity = 'NONE';
@$identity = $ret[0]['identity'];
if(empty($ret)){
die();
}
if($identity == 'ADM'){
//echo '3';
//die();
}
$ip = $_SERVER["REMOTE_ADDR"];
$ip = '192.' . rand(100, 999) . '.' . rand(10,99) . '.' . rand(10,99);
$no = $_REQUEST['no'];
$url = 'http://k.1ka123.com/querystatus';
$post = array(
'no' => $no
);
$options = array(
CURLOPT_RETURNTRANSFER =>true,
CURLOPT_HEADER =>false,
CURLOPT_POST =>true,
CURLOPT_POSTFIELDS => $post,
);
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 10);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
//curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)');
curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (iPhone; CPU iPhone OS 11_1_1 like Mac OS X) AppleWebKit/603.1.30 (KHTML, like Gecko) Version/11.1.1 Mobile/14E304 Safari/602.1');
curl_setopt($ch, CURLOPT_HTTPHEADER, array('X-FORWARDED-FOR:' . $ip, 'CLIENT-IP:' . $ip));
curl_setopt ($ch, CURLOPT_REFERER, $url);
curl_setopt_array($ch, $options);
$html = curl_exec($ch);
curl_close($ch);
echo $html;
?>