Fixed to use $_SERVER