In PHP, is there a reliable and good way of getting these things:
Protocol: i.e. http or https Servername: e.g. localhost Portnumber: e.g. 8080
$_SERVER['SERVER_PORT'] will give you the port currently used.
$_SERVER['SERVER_PORT']