| 2 comments ]


function get_url(){

$server = empty( $_SERVER["HTTPS"] ) ? '' : ( $_SERVER["HTTPS"] == "on" ) ? "s" : "";

$root= substr( strtolower ( $_SERVER["SERVER_PROTOCOL"] ), 0,
strpos( strtolower( $_SERVER["SERVER_PROTOCOL"] ), "/") ) . $server;

$root .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$root.= $_SERVER["SERVER_NAME"]. " : " .$_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"];
} else {
$root.= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"];
}
return $root;

}

2 comments

phpfrnd said... @ Saturday, August 1, 2009 at 9:02:00 AM GMT+1

Your blog is very informative, I have learned so much from it..Keep on updating your blog

tech said... @ Saturday, August 1, 2009 at 9:21:00 AM GMT+1

your blog helped me with ocean of knowledge..Good job

Post a Comment

Please put your comments here. your questions, your suggestions, also what went wrong with me.