Hi,
Yes, somewhat new in PHP - so please bare with me.
What I am trying to do is to make a script which pings some IPs X times every Y minutes, and pick up the result and store it in a database. The part about getting the IPs to ping from a list (database), doing it every Y minutes (cron job) and getting it stored in a database - those parts I can handle. What I cannot figure out how to do is this:
Ping from PHP and pick up the result and then store it (timestamp, IP, and time in ms) in an array.
Can someone please help me on this?
Thanks a lot!!
//Anders
Ping a server and fetch a 'clean' result
Moderator: General Moderators
Re: Ping a server and fetch a 'clean' result
Unless you want to try your hand at ICMP, learn about:
1. Executing shell commands using (for example) exec,
2. Redirecting shell output to a file, and
3. Reading files in PHP.
1. Executing shell commands using (for example) exec,
2. Redirecting shell output to a file, and
3. Reading files in PHP.
Re: Ping a server and fetch a 'clean' result
Good and simple solution - fast to implement - I have it rolling already.
Thanks!!
Thanks!!