10 portチェック関数

<?php
function checkPort($host, $port, $timeout = 30){
	$sock = @fsockopen($host, $port, $errno, $errstr, $timeout);
	if(!$sock){
		return false;
	}
	fclose($sock);
	return true;
}
?>