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: 
Have you considered a monitoring suite like [Nagios](http://www.nagios.org/) instead of PHP? I think Nagios can give you all this data in a central web-based interface. As far as I know, it has a learning curve that is not entirely trivial, but it may still beat building a PHP solution.
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.