CGI
- Common Gateway Interface (CGI)
GET
- Originally designed for getting information from the server
- The parameters are appended to the URL
/cgi-bin/myscript.cgi?arg1=value1&arg2=value2
POST
- Originally designed for sending information to the server
- The parameters are not shown in the URL
- Slightly more secure than GET
Environment variables
- SERVER_SOFTWARE
- SERVER_NAME
- GATEWAY_INTERFACE
- REQUEST_METHOD ("GET", "POST", "HEAD", "PUT")
- QUERY_STRING
("arg1=value1&arg2=value2")
- SCRIPT_NAME
- PATH_INFO
- PATH_TRANSLATED
- REMOTE_HOST
- REMOTE_ADDR
- SERVER_PORT
- SERVER_PROTOCOL
- AUTH_TYPE
- REMOTE_USER
- REMOTE_IDENT
- CONTENT_TYPE
- CONTENT_LENGTH
- HTTP_USER_AGENT
- HTTP_REFERER
- HTTP_ACCEPT
Parent URL:
category/network
Resources URL:
notes/cgi/resources
Sources URL:
notes/cgi/sources
Topic type:
Topic