change getnv to $_SERVER superglobal