首页>代码>java脚本开发根据客户IP获取IP的具体地理位置信息>/ipDemo/src/com/founder/util/ip/IPLocation.java
package com.founder.util.ip;

/**
 * 
 * 功能描述:用来封装ip相关信息,目前只有两个字段,ip所在的国家和地区
 * 
 */
public class IPLocation{

	private String country;
	private String area;

	/**
	 * 构造函数:
	 */
	public IPLocation() {
		country = "";
		area = "";
	}

	public IPLocation getCopy() {
		IPLocation ret = new IPLocation();
		ret.country = country;
		ret.area = area;
		return ret;
	}

	public String getCountry() {
		return country;
	}

	public void setCountry(String country) {
		this.country = country;
	}

	public String getArea() {
		return area;
	}

	public void setArea(String area) {
		// 如果为局域网,纯真IP地址库的地区会显示CZ88.NET,这里把它去掉
		if (area.trim().equals("CZ88.NET")) {
			this.area = "本机或本网络";
		} else {
			this.area = area;
		}
	}
}
最近下载更多
wjh12345654321  LV14 2021年11月10日
wangdongtai  LV31 2021年9月16日
bzddse  LV1 2020年12月24日
BruceQ  LV14 2020年12月10日
JoeJie  LV6 2020年9月4日
1170239664  LV6 2020年4月7日
zhoumengshun  LV4 2020年4月1日
做自己的太阳  LV11 2019年12月5日
wangminmin  LV1 2019年10月7日
longjueyuyu  LV7 2019年4月24日
最近浏览更多
暂无贡献等级
jahshdhdbdbb 3月18日
暂无贡献等级
WBelong  LV7 2023年12月18日
syzlll 2023年6月13日
暂无贡献等级
wuziayng1232  LV10 2023年5月25日
大王巡山  LV10 2022年11月10日
kkfu123  LV4 2022年10月13日
adminadminsqwqe  LV7 2022年6月10日
rain112  LV30 2022年5月16日
Jeasonchan898  LV2 2022年4月26日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友