<?php // Get the request method (GET, POST, PUT, DELETE, etc.) $method = $_SERVER['REQUEST_METHOD']; // Get the requested URI $uri = $_SERVER['REQUEST_URI']; // Get the server protocol (HTTP/1.0, HTTP/1.1) $protocol = $_SERVER['SERVER_PROTOCOL']; // Get the client's IP address $client_ip = $_SERVER['REMOTE_ADDR']; // Get specific headers $host = $_SERVER['HTTP_HOST']; $user_agent = $_SERVER['HTTP_USER_AGENT'];