Remove XSS vulnerability

Removed the unsanitized $_SERVER variables to remove the XSS vulnerability.
Updated generic error message
Merge pull request #1684 from rbeede/master

Remove XSS from examplepage.php. Fixes #1683.