/ Published in: PHP
this function return associative array from SERVER_SOFTWARE
Expand |
Embed | Plain Text
function getServerSoftware($key = 'SERVER_SOFTWARE') { $regex = "/(?<software>\w+)\/(?<version>[0-9.a-z]*)/"; return array_combine($arr['software'], $arr['version']); else } //USAGE EXAMPLE //get array $serverInfo = getServerInfo(); //print apache version //print all information
You need to login to post a comment.
