├── demo_img ├── 1.png ├── 2.png └── 3.png ├── favicon ├── favicon-16x16.png ├── favicon-32x32.png └── apple-touch-icon.png ├── 404.html ├── README.md ├── do.php ├── logo.svg └── index.php /demo_img/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enweny/My-IP-Information/HEAD/demo_img/1.png -------------------------------------------------------------------------------- /demo_img/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enweny/My-IP-Information/HEAD/demo_img/2.png -------------------------------------------------------------------------------- /demo_img/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enweny/My-IP-Information/HEAD/demo_img/3.png -------------------------------------------------------------------------------- /favicon/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enweny/My-IP-Information/HEAD/favicon/favicon-16x16.png -------------------------------------------------------------------------------- /favicon/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enweny/My-IP-Information/HEAD/favicon/favicon-32x32.png -------------------------------------------------------------------------------- /favicon/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/enweny/My-IP-Information/HEAD/favicon/apple-touch-icon.png -------------------------------------------------------------------------------- /404.html: -------------------------------------------------------------------------------- 1 | 2 | 404 Not Found 3 | 4 |

404 Not Found

5 |
nginx
6 | 7 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # My-IP-Information 2 | 利用Cloudflare进行查询自己IP的信息 3 | 4 | 去注册百度地图的开发者账号,申请API,申请地址:https://lbsyun.baidu.com/index.php?title=jspopularGL 每天5k用量也够用了 5 | 6 | 修改index.php里对应的位置即可看到地图(由于IP定位获取到的经纬度不准,图一乐) 7 | 8 | 自动根据系统语言显示中文/英文,或者手动切换 9 | 10 | 设置Cloudflare动态IP信息:参考demo_img文件夹里的内容 11 | 12 | -------------------------------------------------------------------------------- /do.php: -------------------------------------------------------------------------------- 1 | "查看我的IP信息", 18 | "ip_info" => "IP", 19 | "ip_city" => "城市", 20 | "ip_asn" => "ASN", 21 | "ip_country" => "国家/地区", 22 | "ip_http" => "HTTP", 23 | "ip_longitude" => "经度", 24 | "ip_latitude" => "纬度", 25 | "ip_zipcode" => "邮编", 26 | "ip_threatindex" => "威胁指数", 27 | "ip_timezone" => "时区", 28 | "ip_ua" => "UA", 29 | ); 30 | 31 | // 英文翻译字符串 32 | $translations_en = array( 33 | "my_ip_info" => "View My IP Information", 34 | "ip_info" => "IP", 35 | "ip_city" => "City", 36 | "ip_country" => "Country", 37 | "ip_asn" => "ASN", 38 | "ip_http" => "HTTP", 39 | "ip_longitude" => "Longitude", 40 | "ip_latitude" => "Latitude", 41 | "ip_zipcode" => "Zip Code", 42 | "ip_threatindex" => "Threat Index", 43 | "ip_timezone" => "Time Zone", 44 | "ip_ua" => "UA", 45 | ); 46 | 47 | // 中文翻译字符串 48 | $translations_zh = array( 49 | "my_ip_info" => "查看我的IP信息", 50 | "ip_info" => "IP", 51 | "ip_city" => "城市", 52 | "ip_asn" => "ASN", 53 | "ip_country" => "国家/地区", 54 | "ip_http" => "HTTP", 55 | "ip_longitude" => "经度", 56 | "ip_latitude" => "纬度", 57 | "ip_zipcode" => "邮编", 58 | "ip_threatindex" => "威胁指数", 59 | "ip_timezone" => "时区", 60 | "ip_ua" => "UA", 61 | ); 62 | 63 | // 尝试从浏览器语言首选项中获取语言代码 64 | $locale = $_SERVER['HTTP_ACCEPT_LANGUAGE']; 65 | $locale = substr($locale, 0, 2); // 取前两个字符作为语言代码 66 | 67 | // 如果用户已选择语言,则使用其选择的语言 68 | if (isset($_GET['lang'])) { 69 | $locale = $_GET['lang']; 70 | } 71 | 72 | // 选择正确的翻译数组 73 | switch ($locale) { 74 | case "en": 75 | $t = $translations_en; 76 | break; 77 | case "zh": 78 | $t = $translations_zh; 79 | break; 80 | default: 81 | $t = $translations; 82 | break; 83 | } 84 | ?> -------------------------------------------------------------------------------- /logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 9 | 10 | 12 | 14 | 15 | 16 | 19 | 22 | 25 | 29 | 31 | 34 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 31 | 32 | <?php echo $t["my_ip_info"]; ?> 33 | 34 | 35 | 36 | 37 |
38 | 39 | 40 |
41 | 42 | 55 |
56 | 57 |
58 |
59 |
60 |
61 |
62 |
63 |

64 | 65 |

66 |
67 |
68 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 中文'; 79 | } else { 80 | echo ' 81 | 82 | 83 | 84 | 85 | 86 | 87 | English'; 88 | } 89 | ?> 90 |
91 |
92 | 93 |
94 |
95 | 96 | 97 | 98 | 99 | 102 | 103 | 104 | 105 | 108 | 109 | 110 | 111 | 114 | 115 | 116 | 117 | 120 | 121 | 122 | 123 | 126 | 127 | 128 | 129 | 132 | 133 | 134 | 135 | 138 | 139 | 140 | 141 | 144 | 145 | 146 | 147 | 150 | 151 | 152 | 153 | 156 | 157 | 158 | 159 | 162 | 163 | 164 |
100 | 101 |
106 | 107 |
112 | 113 |
118 | 119 |
124 | 125 |
130 | 131 |
136 | 137 |
142 | 143 |
148 | 149 |
154 | 155 |
160 | 161 |
165 |
166 |
167 |
168 | 169 |
170 |
171 |
172 |
173 |
174 |
175 |
176 |
177 |
178 |
179 | 180 |
181 | 182 |
183 | 184 |
185 |
186 |
187 |
188 |
    189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 |
207 |
208 | 209 |
210 |
    211 |
  • 212 | © 2023 213 | Ping.is 214 |
  • 215 | 216 | 217 | 218 | 219 | 220 | 221 |
222 |
223 |
224 |
225 |
226 |
227 | 228 | 229 |
230 | 231 | 232 | 239 | 240 | 241 | --------------------------------------------------------------------------------