Copyright 2007 Eric Shane Radman This is free software; you may redistribute, modify, and use it under the terms of the Modified BSD License. -- STARTING OUTPUT AND SETTING COOKIES # Start output print_string "Content-type: text/html\n" ; # Set cookie that expires in 10 minutes printf "Set-Cookie:%s=%s;expires=%s\n" "id" "value" (rfc1123_date 10) ; # End HTTP header print_string "\n\n" # Print value of cookie printf "%s\n" (get_cookie "id") ENVIRONMENT # Get the value of a given environment variable printf "%s\n" (getenv "REMOTE_HOST") ENCODING # Write HTML encoded string printf "%s" (escape_html "&<>") QUERY STRINGS # Get the value of ?name= in the URL printf "%s\n" (get_querystring "name") POST VALUES # Get the value of a posted form value printf "%s\n" (get_poststring "name") ; WRITING OUTPUT out "" ; out ""