WebSite Monitoring (Ping Website) In PHP - Online Code


This code allows you to check whether a domain, server is up or down and how fast it is. Generally speaking, it implements a ping command with PHP.

Source Code

// Function to check response time
function pingDomain($domain){
	$starttime = microtime(true);
	$file	 = fsockopen ($domain, 80, $errno, $errstr, 10);
	$stoptime  = microtime(true);
	$status	 = 0;

	if (!$file
... (login or register to view full code)

To view full code, you must Login or Register, its FREE.

Hey, registering yourself just takes less than a minute and opens up a whole new GetGyan experience.


No comment yet. Be the first to post a comment.