To get the system release information in PHP, you can use the uname
command which returns information about the current system such as the kernel name, network node hostname, kernel release, kernel version, machine hardware name, and operating system.
You can use PHP's shell_exec
function to execute the uname -r
command, which will return the release information of the current system:
main.php97 chars4 lines
This will store the system release information in the $release
variable and then print it to the console.
gistlibby LogSnag