rendered paste body<?php#fonction pour afficher la distribution utiliséefunction check_distro() { $path = '/proc/version'; $ubuntu = exec('cat '.$path.' | grep "ubuntu"'); $debian = exec('cat '.$path.' | grep "debian"'); $gentoo = exec('cat '.$path.' | grep "gentoo"'); $fedora = exec('cat '.$path.' | grep "fedora"'); $mandriva = exec('cat '.$path.' | grep "mandriva"'); $redHat = exec('cat '.$path.' | grep "red"'); $slackware = exec('cat '.$path.' | grep "slackware"'); $suse = exec('cat '.$path.' | grep "suse"'); if ($ubuntu) { echo 'Distribution : <font color=blue>Ubuntu</font>'; } elseif($debian) { echo 'Distribution : <font color=blue>Debian</font>'; } elseif($gentoo) { echo 'Distribution : <font color=blue>Gentoo</font>'; } elseif($fedora) { echo 'Distribution : <font color=blue>Fedora</font>'; } elseif($mandriva) { echo 'Distribution : <font color=blue>Mandriva Linux</font>'; } elseif($redHat) { echo 'Distribution : <font color=blue>Red Hat</font>'; } elseif($slackware) { echo 'Distribution : <font color=blue>Slackware</font>'; } elseif($suse) { echo 'Distribution : <font color=blue>Debian</font>'; }}?>