Get Current URL in PHP
I know for most people, this has been done a million times… But it’s the little things that sometimes help. So this is how you would grab the current request URL and feed it into a local variable so you can play with it. <?php $url = (!empty($_SERVER[‘HTTPS’])) ? “https://”.$_SERVER[‘SERVER_NAME’].$_SERVER[‘REQUEST_URI’] : “http://”.$_SERVER[‘SERVER_NAME’].$_SERVER[‘REQUEST_URI’]; ?> It just says, if we have an