global $SERVER_PORT,$HTTP_HOST; if (($pos = strpos($HTTP_HOST,':')) !== false) $HTTP_HOST = substr($HTTP_HOST,0,$pos); $SERVER_PORT = 80; $_SERVER["SERVER_PORT"] = $SERVER_PORT; $_SERVER["HTTP_HOST"] = $HTTP_HOST;