Get Server Response Header and then only echo Server OS?
Posted: Sun Sep 02, 2007 12:11 am
I'm going off the example on this page...
http://us3.php.net/manual/en/function.get-headers.php
So I figured I could do something like this...
To get (from the example page) something like this...
Apache/1.3.27 (Unix) (Red-Hat/Linux)
How should I correct my code?
http://us3.php.net/manual/en/function.get-headers.php
So I figured I could do something like this...
Code: Select all
<?php
$thisserver = 'http://' . $_SERVER['HTTP_HOST'];
print_r(get_headers($thisserver['Server']));
echo get_headers($thisserver);?>Apache/1.3.27 (Unix) (Red-Hat/Linux)
How should I correct my code?