Reputation: 3805
I'm looking to get server details from a remote server using PHP. I know I can get some details by just grabbing the headers, but I also want to get the server up time, bandwidth usage, etc. If you could tell me how to do this or point me in the right direction, I would be appreciative.
Upvotes: 0
Views: 2388
Reputation: 2564
Did you tried this?
http://phpsysinfo.sourceforge.net/ or http://www.zabbix.com/
Zabbix is professional yet opensource network monitoring system and works excellent and could provide you all info you're looking for. It's frontend is written completely in PHP so you can hack into it the way you want.
EDIT:
Basically you can't get all the information that you're looking for without installing some program or tools on server which can monitor these parameters for you and return you back.
May be you can get "uptime
" by executing command using exe(uptime
) or something similar but for bandwidth usage I think it would be difficult to get unless you get it by firing some commands in background in your php script.
Some of the utilities which might help you do that would be ifstat
or iftop
but they are not installed by default on ubuntu/debian based systems so if you want to use them you need to install them so not possible w/o access to machine.
Upvotes: 1