Forum Moderators: coopster
Is it possible to monitor server/website uptime using PHP Script? If yes, does it really consumes a lot of bandwidth? What are the important parts that I should look into?
There are lots of online monitoring software out there but they only offer a few URL to monitor.
any advice please?
thanks in advance.
$fp = fsockopen("www.example.com", 80, $errno, $errstr, 30);
if (!$fp) {
echo "$errstr ($errno)<br />\n";
}
does it really consumes a lot of bandwidth
Some uptime trackers allow too check if some string present on target webpage. In this case script will have to load page text, and will consume more bandwidth.