PHP Classes

File: index.php

Recommend this page to a friend!
  Classes of Dimitri Sitchet   PHP Sysinfo Command   index.php   Download  
File: index.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Sysinfo Command
Get the current machine CPU, memory, disk, etc.
Author: By
Last change:
Date: 1 year ago
Size: 385 bytes
 

Contents

Class file image Download
<?php
spl_autoload_register
(function($name) {
   
$name = str_replace('Dimtrov\\Sysinfo\\', '', $name);
    require_once
'./src/' . $name . '.php';
});

use
Dimtrov\Sysinfo\Sysinfo;

$sysinfo = new Sysinfo();

$ram = [
   
'total' => $sysinfo->cpuFree(),
   
'speed' => $sysinfo->cpuSpeed(),
   
'basespeed' => $sysinfo->cpuFrequency(),

];


echo
'<pre>'.print_r($ram, true).'</pre>';