How would I output environment varaibles in PHP?

Refering URL
Requested URL
Redirect Status

Obviously these are for error pages.

Peter