<?php
header('Content-Type: text/html; charset=utf-8');
function h($str) {return htmlspecialchars($str, ENT_QUOTES, 'UTF-8');}
$domain='yahoo.co.jp';
$whois_server='whois.jprs.jp';
$fp=fsockopen($whois_server,43,$errno,$errstr,15);
if(!$fp){echo "$errstr ($errno)";}
else{fputs($fp,"$domain\n");
echo "<pre>\n";
while(!feof($fp)){$line=fgets($fp,128);
$whois=mb_convert_encoding($line,'UTF-8','auto');
echo h($whois);}
echo "\n</pre>";
fclose ($fp);}
?>
preferences:
42.83 ms | 402 KiB | 5 Q