What are the differences between $_SERVER['HTTP_HOST'], $_SERVER['HTTP_ORIGIN'], and $_SERVER['REQUEST_SCHEME'] in PHP?

$_SERVER['HTTP_HOST'] contains the hostname of the server where the script is running, $_SERVER['HTTP_ORIGIN'] contains the origin of the request (e.g., the domain of the site making the request), and $_SERVER['REQUEST_SCHEME'] contains the protocol of the request (e.g., http or https). These variables can be useful when working with HTTP requests in PHP to determine the host, origin, and scheme of the request.

$host = $_SERVER['HTTP_HOST'];
$origin = $_SERVER['HTTP_ORIGIN'];
$scheme = $_SERVER['REQUEST_SCHEME'];

echo "Host: $host <br>";
echo "Origin: $origin <br>";
echo "Scheme: $scheme <br>";