Get the Linux distribution name in PHP -



Get the Linux distribution name in PHP -

is there way in php figure out linux distribution name of remote server?

extracting $_server['http_user_agent'] os name of client's machine. not want. tried php_uname()

echo 'operating system: '.php_uname('s').'<br>'; // echo php_os; echo 'release name: '.php_uname('r').'<br>'; echo 'version: '.php_uname('v').'<br>'; echo 'machine type: '.php_uname('m').'<br>';

but mode s returns kernel type - linux.

operating system: linux release name: 2.6.32-431.29.2.el6.x86_64 version: #1 smp tue sep 9 21:36:05 utc 2014 machine type: x86_64

i want know fedora, centos or ubuntu, etc. possible? have tried posix_uname(), got error.

fatal error: phone call undefined function posix_uname()

try php system($call) phone call http://php.net/manual/en/function.system.php there can whatever want find out desired infomation, on ubuntu system, might illustration want utilize system('cat /etc/issue'); might want utilize approach, phone call bash script php, illustration http://unix.stackexchange.com/questions/6345/how-can-i-get-distribution-name-and-version-number-in-a-simple-shell-script

php linux operating-system linux-distro

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -