<%
Function GetPageCharset(str)
url=str
Set objXML = CreateObject("MSXML2.ServerXMLHTTP")
objXML.Open "GET", url, false
objXML.Send()
header = objXml.GetAllResponseHeaders
Set objXML = Nothing
header=lcase(header)
if instr(header,"charset=")>0 then
header_str=split(header,"charset=")
header1=replace(header_str(1)," ","")
charset_str=split(header1,"server:")
charset=charset_str(0)
else
charset="gbk"
end if
GetPageCharset=charset
End Function
%>
<%=GetPageCharset("http://www.jy6d.com/")%>