Could someone come up with the code (if this is possible) to display the servers status outside of cpanel. For example when a visitor visits our website they can look at he status of the server (s). as cpanel already has the status area is there anyway to just use its code and put it into a form of some kind?
Save and upload to your web directory along with the two images online.jpg + offline.jpg (you can make these or simply use the green / red one's from CPanel, also making sure to change the IP to your own.)
careful with fsockopen connections, just because the port is available doesn't mean there's enough system resources available to serve the connection. The most common server death out there is an out of control process: leaves the port open (fsock connects), but nothing is accessible.
The script you want can be coded in servlet or ASP . but to give this information to normal user is not recommended . so you can give the user the number of hits to the website. The sample asp code is as follows.
Create a folder titled "Counter" and a text file "counter.txt".