Monday, September 10, 2007

how to get url with the help of server variable

$domain = $_SERVER['HTTP_HOST'];
// find out the path to the current file:
$path = $_SERVER['SCRIPT_NAME'];
echo $path;
$url = "http://" . $domain . $path ;

No comments: