Vous trouverez une liste des différents indices de cette variable sur php.net
Exemple :var_dump($_SERVER);Donne actuellement sur ce serveur :
array(49) {
["USER"]=>
string(8) "belzoras"
["FCGI_ROLE"]=>
string(9) "RESPONDER"
["APP_ENGINE"]=>
string(3) "php"
["APP_ENGINE_VERSION"]=>
string(3) "5.4"
["ENVIRONMENT"]=>
string(10) "production"
["DOCUMENT_ROOT"]=>
string(28) "/home/belzoras/www/Formation"
["UNIQUE_ID"]=>
string(27) "abcCkYzBri2uGO0gCnh02AAAAEQ"
["GEOIP_COUNTRY_CODE"]=>
string(2) "US"
["GEOIP_COUNTRY_NAME"]=>
string(13) "United States"
["GEOIP_REGION"]=>
string(2) "CA"
["GEOIP_CITY"]=>
string(11) "Santa Paula"
["GEOIP_DMA_CODE"]=>
string(3) "803"
["GEOIP_AREA_CODE"]=>
string(3) "805"
["GEOIP_LATITUDE"]=>
string(9) "34.355598"
["GEOIP_LONGITUDE"]=>
string(11) "-119.070099"
["SCRIPT_URL"]=>
string(87) "/_other_lessons/php-intro/courses/01-PHP/02-Les variables Superglobales/02-$_SERVER.php"
["SCRIPT_URI"]=>
string(116) "https://3wa.belzorash.com:443/_other_lessons/php-intro/courses/01-PHP/02-Les variables Superglobales/02-$_SERVER.php"
["HTTPS"]=>
string(2) "on"
["CFG_CLUSTER"]=>
string(10) "cluster110"
["HTTP_HOST"]=>
string(17) "3wa.belzorash.com"
["HTTP_X_PREDICTOR"]=>
string(1) "1"
["HTTP_X_FORWARDED_FOR"]=>
string(13) "216.73.216.20"
["HTTP_X_FORWARDED_PROTO"]=>
string(5) "https"
["HTTP_X_OVHREQUEST_ID"]=>
string(32) "e667cf34f2a33714edfb0d2c0b5d9af3"
["HTTP_ACCEPT"]=>
string(3) "*/*"
["HTTP_USER_AGENT"]=>
string(103) "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
["HTTP_ACCEPT_ENCODING"]=>
string(23) "gzip, br, zstd, deflate"
["HTTP_REMOTE_IP"]=>
string(13) "216.73.216.20"
["SERVER_SIGNATURE"]=>
string(0) ""
["SERVER_SOFTWARE"]=>
string(6) "Apache"
["SERVER_NAME"]=>
string(17) "3wa.belzorash.com"
["SERVER_ADDR"]=>
string(11) "10.110.20.9"
["SERVER_PORT"]=>
string(3) "443"
["REMOTE_ADDR"]=>
string(13) "216.73.216.20"
["SERVER_ADMIN"]=>
string(28) "postmaster@3wa.belzorash.com"
["SCRIPT_FILENAME"]=>
string(115) "/home/belzoras/www/Formation/_other_lessons/php-intro/courses/01-PHP/02-Les variables Superglobales/02-$_SERVER.php"
["REMOTE_PORT"]=>
string(5) "40674"
["GATEWAY_INTERFACE"]=>
string(7) "CGI/1.1"
["SERVER_PROTOCOL"]=>
string(8) "HTTP/1.1"
["REQUEST_METHOD"]=>
string(3) "GET"
["QUERY_STRING"]=>
string(0) ""
["REQUEST_URI"]=>
string(91) "/_other_lessons/php-intro/courses/01-PHP/02-Les%20variables%20Superglobales/02-$_SERVER.php"
["SCRIPT_NAME"]=>
string(87) "/_other_lessons/php-intro/courses/01-PHP/02-Les variables Superglobales/02-$_SERVER.php"
["PHP_SELF"]=>
string(87) "/_other_lessons/php-intro/courses/01-PHP/02-Les variables Superglobales/02-$_SERVER.php"
["REQUEST_TIME_FLOAT"]=>
float(1773601425.9431)
["REQUEST_TIME"]=>
int(1773601425)
["argv"]=>
array(0) {
}
["argc"]=>
int(0)
["register_shutdown_function"]=>
int(1)
}