$url = (($_SERVER["HTTPS"] == "off" || empty($_SERVER["HTTPS"])) ? "http://" : "https://") . $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
http://udadownload.lucb1e.com/randomprojects/geturl.php