- Access the URL of the current page using $_SERVER[‘REQUEST_URI’].
- Retrieve the hostname using $_SERVER[‘HTTP_HOST’].
- Get query string using $_SERVER[‘QUERY_STRING’].
- Retrieve the referring page URL using $_SERVER[‘HTTP_REFERER’].
- Use $_SERVER[‘SCRIPT_NAME’] to obtain the path of the current script.
- Retrieve the path and filename of the current script using $_SERVER[‘PHP_SELF’].
- Retrieve the request method using $_SERVER[‘REQUEST_METHOD’].
- Check if the current protocol is HTTPS using $_SERVER[‘HTTPS’].
- Retrieve user agent information using $_SERVER[‘HTTP_USER_AGENT’].
- Get the client’s IP address by using $_SERVER[‘REMOTE_ADDR’].
✖