diff --git a/php/modules/misc.php b/php/modules/misc.php index eb161e1..a953c76 100755 --- a/php/modules/misc.php +++ b/php/modules/misc.php @@ -95,4 +95,17 @@ function update() { } +function pageURL() { + + $pageURL = 'http'; + if (isset($_SERVER["HTTPS"])&&$_SERVER["HTTPS"]==="on") $pageURL .= "s"; + $pageURL .= "://"; + + if ($_SERVER["SERVER_PORT"]!="80") $pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER['SCRIPT_NAME']; + else $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER['SCRIPT_NAME']; + + return $pageURL; + +} + ?>