//호스트 명 : ex) gooday.kr
echo $_SERVER [ 'HTTP_HOST'];
echo "<br><br>";
//REQUEST_URI : ex) /kang/
echo $_SERVER ['REQUEST_URI'];
echo "<br><br>";
//접속자 IP
echo $REMOTE_ADDR;
echo "<br><br>";
//어디서 접속했는지 : ex) gooday.kr
echo $HTTP_REFERER;
echo "<br><br>";
$host = $_SERVER['HTTP_HOST'];
$self = $_SERVER['PHP_SELF'];
$query = !empty($_SERVER['QUERY_STRING']) ? $_SERVER['QUERY_STRING'] : null;
$url = !empty($query) ? "http://$host$self?$query" : "http://$host$self";
echo $url;