SERVER related interview question in php

$_SERVER is an array containing information such as headers, paths, and script locations.

Ques:- How to get IP address of client?
Ans:- We can get through $_SERVER[‘REMOTE_ADDR’].

Ques:- How to get previous reference page?
Ans:- We can get through $_SERVER[‘HTTP_REFERER’].

Ques:- How to get browser property?
Ans:- We can get through $_SERVER[‘HTTP_USER_AGENT’].

Ques:- How to get server name?
Ans:- We can get through $_SERVER[‘SERVER_NAME’].