print_headers.php<?php
echo '<pre>', var_dump(getallheaders()). '</pre>';
echo '<pre>', print_r($_SERVER, 1), '</pre>';
?>
GETALLHEADERS :
array(18) {
["Host"]=>
string(12) "my_domain.com"
["
X-Real-IP"]=>
string(14) "
MY_IP"
["X-Forwarded-For"]=>
string(30) "MY_IP, MY_IP"
["Connection"]=>
string(5) "close"
["Accept-Encoding"]=>
string(4) "gzip"
["CF-IPCountry"]=>
string(2) "RU"
["CF-RAY"]=>
string(20) "49f53f0c0b4426f0-FRA"
["X-Forwarded-Proto"]=>
string(5) "https"
["CF-Visitor"]=>
string(18) "{"scheme":"https"}"
["cache-control"]=>
string(9) "max-age=0"
["upgrade-insecure-requests"]=>
string(1) "1"
["user-agent"]=>
string(113) "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36"
["dnt"]=>
string(1) "1"
["accept"]=>
string(85) "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8"
["accept-language"]=>
string(32) "ru-RU,ru;q=0.9,en;q=0.8,fr;q=0.7"
["cookie"]=>
string(52) "__cfduid=d6c6e497231d7f0eaa5af707861ad08e61548522097"
["
CF-Connecting-IP"]=>
string(14) "
MY_IP"
["CDN-Loop"]=>
string(10) "cloudflare"
}
$_SERVER
Array
(
[REDIRECT_STATUS] => 200
[HTTP_HOST] => my_domains.com
[
HTTP_X_REAL_IP] =>
MY_IP
[
HTTP_X_FORWARDED_FOR] => MY_IP, MY_IP
[HTTP_CONNECTION] => close
[HTTP_ACCEPT_ENCODING] => gzip
[HTTP_CF_IPCOUNTRY] => RU
[HTTP_CF_RAY] => 49f53f0c0b4426f0-FRA
[HTTP_X_FORWARDED_PROTO] => https
[HTTP_CF_VISITOR] => {"scheme":"https"}
[HTTP_CACHE_CONTROL] => max-age=0
[HTTP_UPGRADE_INSECURE_REQUESTS] => 1
[HTTP_USER_AGENT] => Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
[HTTP_DNT] => 1
[HTTP_ACCEPT] => text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
[HTTP_ACCEPT_LANGUAGE] => ru-RU,ru;q=0.9,en;q=0.8,fr;q=0.7
[HTTP_COOKIE] => __cfduid=d6c6e497231d7f0eaa5af707861ad08e61548522097
[
HTTP_CF_CONNECTING_IP] =>
MY_IP
[HTTP_CDN_LOOP] => cloudflare
[PATH] => /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
[SERVER_SIGNATURE] =>
[SERVER_SOFTWARE] => Apache/2.4.29 (Ubuntu) mod_fcgid/2.3.9 OpenSSL/1.1.0g
[SERVER_NAME] => my_domain.com
[SERVER_ADDR] => *
[SERVER_PORT] => 80
[REMOTE_ADDR] => *
[DOCUMENT_ROOT] => /home/admin/web/my_domain.com/public_html
[REQUEST_SCHEME] => http
[CONTEXT_PREFIX] =>
[CONTEXT_DOCUMENT_ROOT] => /home/admin/web/my_domain.com/public_html
[SERVER_ADMIN] => info@
[SCRIPT_FILENAME] => /home/admin/web/my_domain.com/public_html/print_headers.php
[REMOTE_PORT] => 56802
[REDIRECT_URL] => /
[GATEWAY_INTERFACE] => CGI/1.1
[SERVER_PROTOCOL] => HTTP/1.0
[REQUEST_METHOD] => GET
[QUERY_STRING] =>
[REQUEST_URI] => /
[SCRIPT_NAME] => /print_headers.php
[PHP_SELF] => /print_headers.php
[REQUEST_TIME_FLOAT] => 1548529476.491
[REQUEST_TIME] => 1548529476
)