Well, I will assume you are smart and are therefore using linux.
If this is the case, you can just use the /proc filesystem to get everything you need. There are several files in there, such as /proc/cpuinfo and /proc/meminfo, that are not real files, but virtual files that represent system hardware, so to speak.
By parsing the contents in these files, and more, you could easily get the information you seek.
For example:
<?php
$fp = fopen("/proc/cpuinfo", "r");
while ($line = fgets($fp, 4096)) {
if (ereg("MHz", $line)) {
break;
}
}
$array = split(":", $line);
$cpu_speed = trim($array[1]);
?>
You can now do whatever you want with $cpu_speed. You will want to cut it up a little, because it won't be that pretty. For example, mine comes out as 1460.881. Anyways, that should get you started.
If you are NOT using linux, then sorry, I can't help you. My bet would be that you are S.O.L. on that one.