hi,
how to send email when the server in down in php with cron ?
i have 4 server and i want to check every 2 minutes that if any server is down , email send to my gmail account .
email send once in 24 hrs not after every 2 minutes.how can i do this with php please guide.
thanks in advance.

You can do this by setting the cron job to open a shell script. cURL request the server. If the cURL request fails call the sendmail binary to mail an error to you.. This is one way to get it done!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.