-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathfunctions.php
More file actions
executable file
·100 lines (100 loc) · 4.36 KB
/
Copy pathfunctions.php
File metadata and controls
executable file
·100 lines (100 loc) · 4.36 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
<?php
function getplanet($id){
/*获取星球信息*/
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,'https://community.steam-api.com/ITerritoryControlMinigameService/GetPlanet/v0001/?id='.$id.'&language=schinese');
curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36');
curl_setopt($ch,CURLOPT_REFERER,'https://steamcommunity.com/saliengame/play');
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$a=curl_exec($ch);
curl_close($ch);
return $a;
}
function getplayerinfo($token){
/*获取用户信息*/
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,'https://community.steam-api.com/ITerritoryControlMinigameService/GetPlayerInfo/v0001/');
curl_setopt($ch,CURLOPT_POST,true);
curl_setopt($ch,CURLOPT_POSTFIELDS,array("access_token"=>$token));
curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36');
curl_setopt($ch,CURLOPT_REFERER,'https://steamcommunity.com/saliengame/play');
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$b=curl_exec($ch);
curl_close($ch);
return $b;
}
function reportscore($token,$hardtype){
//传送分数
/*根据难度判断分数*/
switch($hardtype){
case 1:
$score=600;
break;
case 2:
$score=1200;
break;
case 3:
$score=2400;
break;
}
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,'https://community.steam-api.com/ITerritoryControlMinigameService/ReportScore/v0001/');
curl_setopt($ch,CURLOPT_POST,true);
curl_setopt($ch,CURLOPT_POSTFIELDS,array("score"=>$score,"language"=>"schinese","access_token"=>$token));
curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36');
curl_setopt($ch,CURLOPT_REFERER,'https://steamcommunity.com/saliengame/play');
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$c=curl_exec($ch);
curl_close($ch);
return $c;
}
function joinzone($token,$zone_position){
//加入某个块
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,'https://community.steam-api.com/ITerritoryControlMinigameService/JoinZone/v0001/');
curl_setopt($ch,CURLOPT_POST,true);
curl_setopt($ch,CURLOPT_POSTFIELDS,array("zone_position"=>$zone_position,"access_token"=>$token));
curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36');
curl_setopt($ch,CURLOPT_REFERER,'https://steamcommunity.com/saliengame/play');
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$d=curl_exec($ch);
curl_close($ch);
return $d;
}
function leavegame($token,$gameid){
/*跑路*/
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,'https://community.steam-api.com/IMiniGameService/LeaveGame/v0001/');
curl_setopt($ch,CURLOPT_POST,true);
curl_setopt($ch,CURLOPT_POSTFIELDS,array("access_token"=>$token,"gameid"=>$gameid));
curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36');
curl_setopt($ch,CURLOPT_REFERER,'https://steamcommunity.com/saliengame/play');
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$e=curl_exec($ch);
curl_close($ch);
return $e;
}
function getplanets(){
/*获取所有星球信息*/
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,'https://community.steam-api.com/ITerritoryControlMinigameService/GetPlanets/v0001/?active_only=1&language=schinese');
curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36');
curl_setopt($ch,CURLOPT_REFERER,'https://steamcommunity.com/saliengame/play');
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$f=curl_exec($ch);
curl_close($ch);
return $f;
}
function joinplanet($token,$id){
/*跑路*/
$ch=curl_init();
curl_setopt($ch,CURLOPT_URL,'https://community.steam-api.com/ITerritoryControlMinigameService/JoinPlanet/v0001/');
curl_setopt($ch,CURLOPT_POST,true);
curl_setopt($ch,CURLOPT_POSTFIELDS,array("access_token"=>$token,"id"=>$id));
curl_setopt($ch,CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.78 Safari/537.36');
curl_setopt($ch,CURLOPT_REFERER,'https://steamcommunity.com/saliengame/play');
curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);
$e=curl_exec($ch);
curl_close($ch);
return $e;
}