So here is everything you need :
PHP Code:
$current_host = $_SERVER['HTTP_HOST'];
$current_path = $_SERVER['PHP_SELF'];
$full_web_path = "http://" . $current_host . $current_path;
Now the variable $full_web_path contains the correct info. The "http://" is optional. Like I said above if your PHP < 4.1 you will need to use $HTTP_SERVER_VARS instead of $_SERVER. So this would replace if you are running an earlier version of PHP :
PHP Code:
$current_host = $HTTP_SERVER_VARS['HTTP_HOST'];
$current_path = $HTTP_SERVER_VARS['PHP_SELF'];
$full_web_path = "http://" . $current_host . $current_path;
Hope that helps.
Rory
