Content-Type:text/html Perlの環境変数取得

※このサンプルの解説は、「CGIの扉」をすべて読み終えてる方を前提としています。

【Perlの環境変数取得】
※クッキーは自分自身の情報が見えてるだけで他人に見えるわけではありません。

CONTEXT_DOCUMENT_ROOT: /home/atompro.net/beginners/cgi-bin
CONTEXT_PREFIX: /cgi-bin
DOCUMENT_ROOT: /home/atompro.net/beginners/html
GATEWAY_INTERFACE: CGI/1.1
HTTPS: on
HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_ACCEPT_ENCODING: br,gzip
HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.5
HTTP_CONNECTION: Keep-Alive
HTTP_HOST: beginners.atompro.net
HTTP_IF_MODIFIED_SINCE: Wed, 06 Dec 2023 06:54:34 GMT
HTTP_USER_AGENT: CCBot/2.0 (https://commoncrawl.org/faq/)
PATH: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin
QUERY_STRING:
REDIRECT_HTTPS: on
REDIRECT_SSL_TLS_SNI: beginners.atompro.net
REDIRECT_STATUS: 200
REDIRECT_UNIQUE_ID: ZpHirN4MZBxaC0exa@4bjwAAAAE
REDIRECT_URL: /cgitest_getenv.cgi
REDIRECT_php_admin_value: open_basedir /home:/etc:/tmp:/usr:/root
REDIRECT_php_value: error_reporting 0
REMOTE_ADDR: 34.204.198.73
REMOTE_PORT: 35298
REQUEST_METHOD: GET
REQUEST_SCHEME: https
REQUEST_URI: /cgitest_getenv.cgi
SCRIPT_FILENAME: /home/atompro.net/beginners/cgi-bin/cgitest/getenv.cgi
SCRIPT_NAME: /cgi-bin/cgitest/getenv.cgi
SERVER_ADDR: 192.168.1.100
SERVER_ADMIN: root@localhost
SERVER_NAME: beginners.atompro.net
SERVER_PORT: 443
SERVER_PROTOCOL: HTTP/1.1
SERVER_SIGNATURE:
SERVER_SOFTWARE: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips mod_auth_gssapi/1.5.1 mod_nss/1.0.14 NSS/3.28.4 mod_wsgi/3.4 Python/2.7.5 PHP/8.1.25
SSL_TLS_SNI: beginners.atompro.net
UNIQUE_ID: ZpHirN4MZBxaC0exa@4bjwAAAAE
php_admin_value: open_basedir /home:/etc:/tmp:/usr:/root

page update:

Copyright (c) 2000-2009, all Rights Reserved & Produced by atom