extract port from the url