From 2a8b727d4bc92af070e8f80b1aeb94a659554a68 Mon Sep 17 00:00:00 2001 From: rvelices Date: Thu, 19 Oct 2006 21:33:43 +0000 Subject: feature 563: send an email to admin when new user registers (optional) git-svn-id: http://piwigo.org/svn/trunk@1566 68402e56-0260-453c-a942-63ccdbb3a9ee --- include/functions_url.inc.php | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/functions_url.inc.php') diff --git a/include/functions_url.inc.php b/include/functions_url.inc.php index 22c91d1e6..0d2ea4a7e 100644 --- a/include/functions_url.inc.php +++ b/include/functions_url.inc.php @@ -51,6 +51,21 @@ function get_root_url() } } +/** + * returns the url of the current host (e.g. http://www.toto.com ) + * TODO: if required by someone, treat https case + */ +function get_host_url() +{ + $url = "http://"; + $url .= $_SERVER['HTTP_HOST']; + if ($_SERVER['SERVER_PORT']!=80) + { + $url .= ':'.$_SERVER['SERVER_PORT']; + } + return $url; +} + /** * adds one or more _GET style parameters to an url * example: add_url_params('/x', array('a'=>'b')) returns /x?a=b -- cgit v1.2.3