<%
’取得HTTP输入的值并付值到host中
httptext=lcase(request.servervariables("HTTP_HOST"))
’分割以.
host=split(httptext,".")
’取出第一个.前的字符串
hosts=host(0)
’取得城市拼音
httptext=Replace(hosts,"http://","")
’地区拼音数组
citypy = array("shanghai","beijing","tianjin","chongqing","hebei","shanxi","neimenggu",
"liaoning","jilin","heilongjiang","jiangsu","zhejiang","anhui","fujian","jiangxi",
"shandong","henan","hubei","hunan","guangdong","guangxi","hainan",
"sichuan","guizhou","yunnan","xizang","shaanxi","gansu","ningxia","qinghai",
"xinjiang") ’地区汉字数组
pro=array("上海","北京","天津","重庆","河北","山西","内蒙古","辽宁","吉林","黑龙江",
"江苏","浙江","安徽","福建","江西","山东","河南","湖北","湖南","广东","广西","海南",
"四川","贵州","云南","西藏","陕西","甘肃","宁夏","青海","新疆")
’利用循环,找出当前的城市汉字名
For y=0 to Ubound(citypy)
If citypy(y)=httptext Then
’取得当前城市名
cityname=pro(y)
End If
Next
%>