Connecting to a remote webserver using php
I need some help with checking the health of a remote webserver by running a php script at regular intervals.
This script should try to connect to the webserver and check if it gets a healthy response and send an e-mail if the server is down. In other words, it should monitor the webserver remotely.
Can anyone help me this? Even a clue would be great. Thanks!