-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
132 lines (120 loc) · 3.31 KB
/
index.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
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
<?php
if(empty($_SERVER['REQUEST_METHOD'])){
//GET
}
switch($_SERVER['REQUEST_METHOD']){
case 'GET':
//Used to retrieve a resource identified by a URL. The response contains the resource's content.
break;
case 'POST':
//Used to submit data to a resource identified by a URL. The data is included in the body of the request, and the response may contain a message confirming that the data was received.
break;
case 'HEAD':
//Similar to GET, but only requests the headers of the resource, not the content. Useful for checking metadata without downloading the entire resource.
break;
case 'PUT':
//Used to replace the contents of a resource identified by a URL. The request contains the new content, which replaces the old content at the specified URL.
break;
case 'DELET':
//Used to delete a resource identified by a URL.
break;
default:
//GET
break;
}
$exapmple = `
GET
array(5) {
["_GET"]=>
array(1) {
["/sf"]=>
string(0) ""
}
["_POST"]=>
array(0) {
}
["_COOKIE"]=>
array(0) {
}
["_FILES"]=>
array(0) {
}
["_SERVER"]=>
array(37) {
["PATH"]=>
string(28) "/usr/local/bin:/usr/bin:/bin"
["USER"]=>
string(7) "debosit"
["HOME"]=>
string(19) "/media/sdn1/debosit"
["HTTP_UPGRADE_INSECURE_REQUESTS"]=>
string(1) "1"
["HTTP_ACCEPT_ENCODING"]=>
string(13) "gzip, deflate"
["HTTP_ACCEPT_LANGUAGE"]=>
string(14) "en-US,en;q=0.5"
["HTTP_ACCEPT"]=>
string(85) "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8"
["HTTP_USER_AGENT"]=>
string(84) "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/112.0"
["HTTP_CONNECTION"]=>
string(5) "close"
["HTTP_HOST"]=>
string(30) "debosit.gyges.feralhosting.com"
["HTTP_X_FORWARDED_PROTO"]=>
string(4) "http"
["HTTP_X_FORWARDED_FOR"]=>
string(20) "::ffff:80.151.29.159"
["HTTP_X_REAL_IP"]=>
string(20) "::ffff:80.151.29.159"
["HTTP_X_HOST"]=>
string(30) "debosit.gyges.feralhosting.com"
["REDIRECT_STATUS"]=>
string(3) "200"
["SERVER_NAME"]=>
string(30) "debosit.gyges.feralhosting.com"
["SERVER_PORT"]=>
string(4) "8080"
["SERVER_ADDR"]=>
string(10) "10.0.20.87"
["REMOTE_PORT"]=>
string(5) "42886"
["REMOTE_ADDR"]=>
string(13) "185.21.217.20"
["SERVER_SOFTWARE"]=>
string(12) "nginx/1.10.3"
["GATEWAY_INTERFACE"]=>
string(7) "CGI/1.1"
["REQUEST_SCHEME"]=>
string(4) "http"
["SERVER_PROTOCOL"]=>
string(8) "HTTP/1.0"
["DOCUMENT_ROOT"]=>
string(66) "/media/sdn1/debosit/www/debosit.gyges.feralhosting.com/public_html"
["DOCUMENT_URI"]=>
string(10) "/index.php"
["REQUEST_URI"]=>
string(3) "/sf"
["SCRIPT_NAME"]=>
string(10) "/index.php"
["CONTENT_LENGTH"]=>
string(0) ""
["CONTENT_TYPE"]=>
string(0) ""
["REQUEST_METHOD"]=>
string(3) "GET"
["QUERY_STRING"]=>
string(3) "/sf"
["SCRIPT_FILENAME"]=>
string(76) "/media/sdn1/debosit/www/debosit.gyges.feralhosting.com/public_html/index.php"
["FCGI_ROLE"]=>
string(9) "RESPONDER"
["PHP_SELF"]=>
string(10) "/index.php"
["REQUEST_TIME_FLOAT"]=>
float(1682079310.6765)
["REQUEST_TIME"]=>
int(1682079310)
}
}
`;