` CS130A PHP Lab 1 Page

Lab 1 for CS 130A PHP Programming - Play with Super Globals

Back to PHP Home Page

Course Number: CS130A
Course Name: PHP Programming
Name: Edward A. Caruso
Lab: Lab 1
Date: Sep 21, 2018

$_SERVER Keys and Values

PATH=>/bin:/usr/bin:/sbin:/usr/sbin
RAILS_ENV=>production
SCRIPT_NAME=>/cs130a/lab1.php
REQUEST_URI=>/cs130a/lab1.php
QUERY_STRING=>
REQUEST_METHOD=>GET
SERVER_PROTOCOL=>HTTP/1.1
GATEWAY_INTERFACE=>CGI/1.1
REMOTE_PORT=>49260
SCRIPT_FILENAME=>/home/edwcar6/immutableforce.com/cs130a/lab1.php
SERVER_ADMIN=>webmaster@immutableforce.com
DOCUMENT_ROOT=>/home/edwcar6/immutableforce.com
REMOTE_ADDR=>54.162.159.33
SERVER_PORT=>443
SERVER_ADDR=>208.113.153.70
SERVER_NAME=>www.immutableforce.com
SERVER_SOFTWARE=>Apache
SERVER_SIGNATURE=>
HTTP_ACCEPT_ENCODING=>gzip
HTTP_CONNECTION=>close
HTTP_HOST=>www.immutableforce.com
HTTP_ACCEPT=>text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT=>CCBot/2.0 (https://commoncrawl.org/faq/)
SSL_TLS_SNI=>www.immutableforce.com
HTTPS=>on
DH_USER=>edwcar6
ds_id_37109695=>
dsid=>37109695
SCRIPT_URI=>https://www.immutableforce.com/cs130a/lab1.php
SCRIPT_URL=>/cs130a/lab1.php
UNIQUE_ID=>W6W@3NBxmVwAAGwFtNAAAAAB
FCGI_ROLE=>RESPONDER
PHP_SELF=>/cs130a/lab1.php

Print strings using single-quotes:

All PHP variables begin with a "$" character.
We're learning about proper quoting using double quotes (") and single quotes (').
We can print variables inside of double-quoted strings. For example: $demo.

Print strings using double-quotes:

All PHP variables begin with a "$" character.
We're learning about proper quoting using double quotes (") and single quotes (').
We can print variables inside of double-quoted strings. For example: DEMO.

Isolate the Browser information in $_SERVER and assign it to $browser, then print it

Hello, I see that you are using CCBot/2.0 (https://commoncrawl.org/faq/).


Last Updated: September 5, 2009

Valid XHTML 1.0 Strict Valid CSS!