` 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: Jun 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=>54688
SCRIPT_FILENAME=>/home/edwcar6/immutableforce.com/cs130a/lab1.php
SERVER_ADMIN=>webmaster@immutableforce.com
DOCUMENT_ROOT=>/home/edwcar6/immutableforce.com
REMOTE_ADDR=>54.144.16.135
SERVER_PORT=>80
SERVER_ADDR=>208.113.153.70
SERVER_NAME=>www.immutableforce.com
SERVER_SOFTWARE=>Apache
SERVER_SIGNATURE=>
HTTP_CONNECTION=>close
HTTP_IF_MODIFIED_SINCE=>Thu, 22 Mar 2018 11:27:45 GMT
HTTP_ACCEPT=>text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
HTTP_USER_AGENT=>CCBot/2.0 (http://commoncrawl.org/faq/)
HTTP_ACCEPT_ENCODING=>x-gzip, gzip, deflate
HTTP_HOST=>www.immutableforce.com
DH_USER=>edwcar6
ds_id_13295123=>
dsid=>13295123
SCRIPT_URI=>http://www.immutableforce.com/cs130a/lab1.php
SCRIPT_URL=>/cs130a/lab1.php
UNIQUE_ID=>Wywe3dBxmVwAAFukBb4AAAAM
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 (http://commoncrawl.org/faq/).


Last Updated: September 5, 2009

Valid XHTML 1.0 Strict Valid CSS!