Explain pliz purpose of the while loop in the function code, I understand that there is a check at the end of the file, but why in the loop, what is not done? was it easier to do an if check? thanks in advance
function whois($domain) { echo $domain; $whoisdom='whois.nic.ru'; // $ask=fsockopen($whoisdom, 43, $errno, $errstr, 30); if(!isset($ask)) { $respons = "$errstr ($errno)"; } else { $respons=""; fputs($ask, "$domain\r\n"); while(!feof($ask)) $respons .=fread($ask, 1500); fclose($ask); } //$respons=str_replace("\n", "<br/>", $respons); return $respons; } $a=whois("vk.com"); echo $a;