Question: I need to find remote data such as RAM usage, swap usage, number of processors, etc, using a php script from the local computer and 10 other remote computers.

How can I go about it?

The remote computers are all running Linux, and they can run any service that is needed of the machine.

What I have in mind is that I can somehow use ssh using the PHP script. Then use top or something to find what I need.

It also needs to be a single PHP file that displays all the information.

Answer: 
I think you will probably want to look at PHP Expect, it allows you to do something like connect to a remote host, and provide input/responses to output on the remote.

<http://us3.php.net/manual/en/book.expect.php>
You can use PHP [sockets](http://www.php.net/manual/en/book.sockets.php) to communicate with servers remotely via [SNMP](http://php.net/manual/en/book.snmp.php). The remote servers need to have SNMP activated and configured to provide the data you need, such as hardware info, bandwidth, disk space, swap usage, etc.