///<summary>
///获取客户端外网IP 省份城市运营商
///2012年12月18 日 15:07
///</summary>publ ic classGetOutMessage
{
/// <summary>
///获取全部信息
/// </summary>
///<retur ns>一段网页代码</retur ns>private static string getOutMessage()
{
WebCl ientcl ient=newWebCl ient();cl ient.Encoding=System.Text.Encoding.Default;string response= cl ient.UploadString("http://iframe.ip138.com/ipcity.asp", "");Match mc=Regex.Match(response,@"location.href=""(.*)""");response=cl ient.UploadString(mc.Groups[1].Value, "");return respo nse;
}
/// <summary>
///外网IP
///</summary>
///<retur ns>外网IP地址</retur ns>publ ic static string getOutIp()
{string response=getOutMessage();int i =response.IndexOf("[") +1;string ip=response.Substring(i,14);string ips=ip.Replace("] ", "").Replace(" ", "");return ips;
}
/// <summary>
///省份
/// </summary>
///<retur ns>省份</retur ns>
publ ic static string getOutProvince()
{string response=getOutMessage();int i =respo nse.Index Of("自") + 2;strin g provi nce = respo nse.Subst ring(i, respo nse.Index Of("省") - i+1);return provi nce;
}
///<summary>
///城市
/// </summary>
///<retur ns>城市</retur ns>publ ic static string getOutCity()
{string response=getOutMessage();int i =respo nse.Index Of("省") + 1;strin g city=respo nse.Subst ring(i, respo nse.Index Of("市") - i + 1);return city;
}
/// <summary>
///运营商
/// </summary>
///<retur ns>运营商</retur ns>publ ic static string getOutProvider()
{string response=getOutMessage();int i =respo nse.Index Of("市") + 2;string provider= response.Substring(i,2);return provi der;
}
}
spinservers是Majestic Hosting Solutions LLC旗下站点,主营国外服务器租用和Hybrid Dedicated等,数据中心在美国达拉斯和圣何塞机房。目前,商家针对圣何塞部分独立服务器进行促销优惠,使用优惠码后Dual Intel Xeon E5-2650L V3(24核48线程)+64GB内存服务器每月仅109美元起,提供10Gbps端口带宽,可以升级至1Gbp...
阿里云国际版注册认证教程-免绑卡-免实名买服务器安全、便宜、可靠、良心,支持人民币充值,提供代理折扣简介SunthyCloud成立于2015年,是阿里云国际版正规战略级渠道商,也是阿里云国际版最大的分销商,专业为全球企业客户提供阿里云国际版开户注册、认证、充值等服务,通过SunthyCloud开通阿里云国际版只需要一个邮箱,不需要PayPal信用卡就可以帮你开通、充值、新购、续费阿里云国际版,服务...
atcloud主要提供常规cloud(VPS)和storage(大硬盘存储)系列VPS,其数据中心分布在美国(俄勒冈、弗吉尼亚)、加拿大、英国、法国、德国、新加坡,所有VPS默认提供480Gbps的超高DDoS防御+不限流量,杜绝DDoS攻击骚扰,比较适合海外建站等相关业务。ATCLOUD.NET是一家成立于2020年的海外主机商,主要提供KVM架构的VPS产品、LXC容器化产品、权威DNS智能解...