ホームページ >バックエンド開発 >PHPチュートリアル >运用fsockopen函数返回的里面有中文显示乱码
使用fsockopen函数返回的里面有中文显示乱码
程序:
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/--> $domain = "6zhou.com"; $whois_server = "whois.ename.com"; $data = ""; $fp = fsockopen($whois_server, 43, $errNo, $errStr, 55); if($fp) { fputs($fp, $domain. "\r\n"); while (!feof($fp)) { $data .= fgets($fp, 128); } fclose($fp); $data = nl2br(htmlentities($data)); echo $data; }
<!--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Domain Name : 6zhou.comRegistrant : é?middot;æµ·å?micro;Domain Name Server : dns1.iidns.comdns2.iidns.comdns3.iidns.comdns4.iidns.comdns5.iidns.comdns6.iidns.comæ?yen;ç湅å®?aelig;?acute;whois请å?deg;:http://whois.ename.net/6zhou.comFor more information,please go to: http://whois.ename.net/6zhou.com