运营商C 获取本机外网IP地址地里位置运营商

外网ip地址  时间:2021-02-26  阅读:()

///<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;

}

}

硅云香港CN2+BGP云主机仅188元/年起(香港云服务器专区)

硅云怎么样?硅云是一家专业的云服务商,硅云的主营产品包括域名和服务器,其中香港云服务器、香港云虚拟主机是非常受欢迎的产品。硅云香港可用区接入了中国电信CN2 GIA、中国联通直连、中国移动直连、HGC、NTT、COGENT、PCCW在内的数十家优质的全球顶级运营商,是为数不多的多线香港云服务商之一。目前,硅云香港云服务器,CN2+BGP线路,1核1G香港云主机仅188元/年起,域名无需备案,支持个...

spinservers:10Gbps带宽高配服务器月付89美元起,达拉斯/圣何塞机房

spinservers是一家主营国外服务器租用和Hybrid Dedicated等产品的商家,Majestic Hosting Solutions LLC旗下站点,商家数据中心包括美国达拉斯和圣何塞机房,机器一般10Gbps端口带宽,且硬件配置较高。目前,主机商针对达拉斯机房机器提供优惠码,最低款Dual E5-2630L v2+64G+1.6TB SSD月付89美元起,支持PayPal、支付宝等...

Hostio€5/月KVM-2GB/25GB/5TB/荷兰机房

Hostio是一家成立于2006年的国外主机商,提供基于KVM架构的VPS主机,AMD EPYC CPU,NVMe硬盘,1-10Gbps带宽,最低月付5欧元起。商家采用自己的网络AS208258,宿主机采用2 x AMD Epyc 7452 32C/64T 2.3Ghz CPU,16*32GB内存,4个Samsung PM983 NVMe SSD,提供IPv4+IPv6。下面列出几款主机配置信息。...

外网ip地址为你推荐
邮箱群发163的邮箱如何群发weipin唯品宝是什么?和唯品金融有什么关系?iphone5解锁iphone5密码忘了怎么解锁金山杀毒怎么样金山杀毒软件咋样?打开网页出现错误我打开网页老出现错误是怎么了?bluestacksBlueStacks安卓模拟器官方版怎么用?渗透测试渗透测试的专业服务在线代理网站最好的免费在线代理网站有哪些~急!安卓应用平台有没有什么安卓游戏都能找到的应用商店或者游戏中心安卓应用平台现在android平台的手机都有哪些?
域名论坛 国外免费vps 电信测速器 表单样式 彩虹ip hkg 如何安装服务器系统 双线机房 美国凤凰城 lick lamp兄弟连 阿里云邮箱登陆 万网主机 umax 汤博乐 重庆联通服务器托管 新网dns winds 免费服务器 更多