Hello PHPbuilders,
Can someone tell me how I can get the full url from the server.
This is what I need as a result of the function (standard):
http://www.somedomain.com/
Reason:
I need to determine if the person is on the [url]http://[/url] or the [url]https://[/url]
Some tests (I allready check phpinfo)
<?php
echo $SERVER["HTTP_REFERER"] ."1<br>";
echo $SERVER["PHP_SELF"] ."2<br>";
echo $SERVER["HTTP_HOST"] ."3<br>";
echo $SERVER["DOCUMENT_ROOT"] ."4<br>";
echo $SERVER["SCRIPT_FILENAME"] ."5<br>";
echo $SERVER["REMOTE_ADDR"] ."6<br>";
echo $_SERVER["PATH_TRANSLATED"] ."7<br>";
if (!isset($_SERVER['REQUEST_URI'])) {
$_SERVER['REQUEST_URI'] = $_SERVER['SCRIPT_NAME'].'?'.$_SERVER['QUERY_STRING'];
}
echo $_SERVER["REQUEST_URI"] ."8<br>";
$get = explode("/",getenv("HTTP_REFERER"));
print_r($get);
echo $get[2]. ."9<br>";
?>
If you know the answer I will love you forever (duhhh)
That's all
Ciao!
Tjitte