Function 1:
<? Php
// Hichina whois (the interfaces used provide valid interfaces for hichina)
Function whois_hichina ($ domain ){
Preg_match ("| <pre> (.?) </Pre> | is ", @ file_get_contents (http://whois.hichina.com/cgi-bin/whois? Domain =. $ domain.), $ whois );
$ Whois [0] = str_replace (Note: as required by the Registry, expired domain names may be in the automatic renewal phase of the Registrar, the domain name expiration date you see here is for reference only <br/> Please <a href = "http://www.net.cn/has_client/userlogon/user_logon1.asp" target = "_ blank" class = "link_gl"> enter the member area </ a> View the actual expiration time of the domain name, please renew it in time. Thank you !, , ($ Whois [0]); // filter out the text
Return $ whois [0];
}
// Function call
Echo whois_hichina (www.ite5e.com)
Function 2:
// Xinnet whois (not provided by xinnet, but modified based on the url of xinnet's own website)
Function whois_xinnet ($ domain ){
Preg_match ("| <div class =" lyTableInfoWrap "> (.?) </Div> | is ", @ file_get_contents (http://www.xinnet.cn/Modules/agent/serv/pages/domain_whois.jsp? DomainNameWhois =. $ domain. & noCode = noCode), $ whois );
Return $ whois [0];
}
// Function call
Echo whois_xinnet (www.ite5e.com)
?>