Reputation: 19561
I'd like to be able to determine whether my PHP script was called from HTTP 1.0 or HTTP 1.1 (or maybe some newer version if one ever comes out).
As in, the following code:
<?php
$ver = /*???*/;
echo 'You requested me with HTTP ' . $ver;
should echo out You requested me with HTTP 1.0
or You requested me with HTTP 1.1
.
What is the fastest way to do this?
(Yes, I know this a bit silly---most things these days are HTTP 1.1, but I worry about that one curl
client.)
Upvotes: 2
Views: 97