bunder5 Posted February 20, 2012 Share Posted February 20, 2012 Stupid question but why would it need the port contained inside the URL for redirection later on? /* The servername and serverport tells PayPal where the buyer should be directed back to after authorizing payment. In this case, its the local webserver that is running this script Using the servername and serverport, the return URL is the first portion of the URL that buyers will return to after authorizing payment */ $serverName = $_SERVER['SERVER_NAME']; $serverPort = $_SERVER['SERVER_PORT']; $url=dirname('http://'.$serverName.':'.$serverPort.$_SERVER['REQUEST_URI']); Quote Link to comment https://forums.phpfreaks.com/topic/257341-server-port/ Share on other sites More sharing options...
kicken Posted February 20, 2012 Share Posted February 20, 2012 You probably don't have to specify it if your just using standard port 80. I'm guessing that is just an example that shows how to set it in case your using an alternate port. Quote Link to comment https://forums.phpfreaks.com/topic/257341-server-port/#findComment-1319053 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.