特牛生活网

php 获取当前用户的ip,请问下,用PHP获取浏览当前用户的公网IP地址,用什么方法啊?...-CSDN博客

网友收藏
文章浏览阅读109次。public function ip($type = 0, $adv = true){$type = $type ? 1 : 0;static $ip = null;if (null !== $ip) {return $ip[$type];}if ($adv) {if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) {$arr = explode(',...